Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install OpenCV in CentOS 6. When I run the command

[root@cosmas opt]# sudo yum install libtiff4-dev libjpeg-dev libjasper-dev

it returned the follow:

Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * epel: mirror.fraunhofer.de
 * rpmforge: nl.mirror.eurid.eu
Setting up Install Process
No package libtiff4-dev available.
No package libjpeg-dev available.
No package libjasper-dev available.
Error: Nothing to do

What I am doing wrong? Can anyone help me?

share|improve this question

2 Answers 2

sudo yum search all --enablerepo=epel libtiff4-dev libjpeg-dev libjasper-dev

Gives-

libjpeg-devel.x86_64 : Development tools for programs which will use the libjpeg library
Warning: No matches found for: libtiff4-dev
Warning: No matches found for: libjasper-dev

Which makes me think that you have wrong package names. Are you sure that these aren't debian package names?

Anyways in the meanwhile you can install libjpeg-devel.x86_64 via-

sudo yum install --enablerepo=epel libjpeg-dev

share|improve this answer

I just did the same install on CentOS 6. Since the install instructions are more geared toward Ubuntu, here is what I was able to do to install it:

  1. install all the required packages using yum

    yum groupinstall "Development Tools" 
    yum install gcc 
    yum install cmake 
    yum install git
    yum install gtk2-devel
    yum install pkgconfig 
    yum install numpy 
    yum install ffmpeg
    
  2. Create working directory and check out the source code

    mkdir /opt/working
    cd /opt/working
    git clone https://github.com/Itseez/opencv.git
    cd opencv
    git checkout tags/2.4.8.2
    
  3. Create the Makefile

    mkdir release
    cd release
    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
    
  4. If using cmake version 2.6-patch 4 (check with cmake --version), then you'll need to comment out a line in the build. Comment out string(MD5 hash "${lines}") on line 50 in /opt/working/opencv/cmake/cl2cpp.cmake. Other options (including updating cmake) can be found at here.

  5. Build and install

    cd /opt/working/opencv/release
    make
    make install
    
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.