3

I'm running 12.04 desktop on a persistence USB pendrive. I Googled around, but answers say something like:

Ubuntu 12.04 provides a package of OpenCV 2.3.1 that you can easily install by typing:

sudo apt-get install libopencv-dev

But it does not work for me.

$ sudo apt-get install libopencv-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libopencv-dev

The following commands each returned successful results:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install build-essential cmake 
1

1 Answer 1

4

That package is available from the Universe repository, if apt can't find it this probably means you are missing that repo in your sources.

Take a look at the sources file:

cat /etc/apt/sources.list

And make sure it includes these lines

deb http://de.archive.ubuntu.com/ubuntu precise main restricted universe   
deb-src http://de.archive.ubuntu.com/ubuntu precise restricted main multiverse universe

deb http://de.archive.ubuntu.com/ubuntu precise-updates main restricted universe  
deb-src http://de.archive.ubuntu.com/ubuntu precise-updates restricted main multiverse universe

Note that to change this file you'll need root permissions, e.g.:

sudo gedit /etc/apt/sources.list

After adding these lines run apt-get update and try to install the package again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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