0

I tried to install the libopencv-nonfree-dev package in Ubuntu 16.04 using the command:

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

But I got the error below:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:

libopencv-nonfree-dev : Depends: libopencv-features2d-dev (= 2.4.9.1+dfsg-1.5ubuntu1xqms2~xenial1) but 2.4.9.1+dfsg-1.5ubuntu1.1 is to be installed

Depends: libopencv-nonfree2.4v5 (= 2.4.9.1+dfsg-1.5ubuntu1xqms2~xenial1) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

What could I do to install it then?

0

1 Answer 1

2

I had some success with this alternative PPA. For completeness, I removed the other one first. I also had to reinstall the main OpenCV package.

sudo add-apt-repository --remove ppa:xqms/opencv-nonfree
sudo add-apt-repository --yes ppa:jeff250/opencv
sudo apt-get update
sudo apt-get install libopencv-dev
sudo apt-get install libopencv-nonfree-dev
1
  • yeah it worked!! Thanks entheh.
    – Khai
    May 8, 2019 at 5:19

Not the answer you're looking for? Browse other questions tagged .