Skip to content

Instantly share code, notes, and snippets.

@awesomebytes
Created November 7, 2017 15:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awesomebytes/00576b7d88f22c580d3e8da2c5361409 to your computer and use it in GitHub Desktop.
Save awesomebytes/00576b7d88f22c580d3e8da2c5361409 to your computer and use it in GitHub Desktop.
Fix missing opencv nonfree on ubuntu 14.04

I got:

  apt: command [sudo -H apt-get install -y libopencv-nonfree2.4] failed

When using rosdep

rosdep install --from-paths src --ignore-src --rosdistro=indigo -y

To solve it:

sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update
sudo apt-get install libopencv-nonfree-dev

The rosdep key was opencv2-nonfree.

@yzsatgithub
Copy link

when there is some version of opencv already installed on your system, this solution might not be working.
prompting something like this:

The following packages have unmet dependencies:
 libopencv-nonfree-dev : Depends: libopencv-features2d-dev (= 2.4.8+dfsg1-2ubuntu1xqms1~trusty1) but it is not going to be installed
                         Depends: libopencv-nonfree2.4 (= 2.4.8+dfsg1-2ubuntu1xqms1~trusty1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment