I am trying to learn image processing and obviously opencv is one of the best options. Usually synaptic does all my installing work for me so I just checked the repos. But in the repos there is only on libcv1 and it is listed as 1.0.0-6.2ubuntu1. Does that mean it is version 1.0 of opencv? Also I found this page in community wiki


It says I need to install libcv4 which is not in my repos. I also downloaded the source but it uses something called cmake, never used it before. Is it similar to make?

  • Just making a note here that 9.10 support ended back in April last year. As a result, answers provided here may not be useful for users of more recent Ubuntu versions. Additionally, outdated versions of Ubuntu no longer receive updates, including important security fixes. We will gladly continue to answer any questions you have for this release, but keep in mind you may want to upgrade at some point so we can provide you with better support. – Knowledge Cube Jan 7 '12 at 23:17
  • See also askubuntu.com/questions/856237/how-do-i-install-python-opencv for installation using pip python package/bundle installer. – pbhj May 24 '19 at 12:35

In your case you have indeed version 1.0.0 of the library.

In general when you want to develop using a library, you have to get the corresponding -dev package which contains the header files. In this case libcv-dev. It will also install the library itself, which may have different version numbers depending on the soname - no need to install it separately.

In this case there is also a opencv-doc package, which contains some example programs, and which is worth installing.

If you want to build the library itself from source, you can run sudo apt-get build-dep opencv to get all the required libraries and header files to build opencv.

Building indeed uses cmake. It is a program which generates makefiles.

  • all the things related to opencv are 1.0.0. So I would have to install it manually? – Rick_2047 Jan 11 '11 at 13:16
  • If you want a more recent version than 1.0.0 you will have to install it manually (you could grab the source package of a more recent version and try to build that). But ask yourself if you really need the features in the last release. For libraries it is often not a very good habit to program with the latest release - which may not be supported as good as the older ones. – johanvdw Jan 11 '11 at 14:09
  • The latest is 2.2 and 1.0.0 is like 2 years old. – Rick_2047 Jan 11 '11 at 18:42
  • If you want the last version you should indeed install manually (or upgrade ubuntu, which has 2.0.0 in lucid(10.04) and 2.1.0 in maverick(10.10). – johanvdw Jan 11 '11 at 18:56

There's a PPA for OpenCV 2.3: https://launchpad.net/~gijzelaar/+archive/opencv2.3


Here is a tutorial for installing the latest OpenCV 2.3.1 with Netbeans 7.1 as IDE.

I don't know if it installs build-essentials by itself, but the tutorial will definitly help you.


  • It uses the PPA of Gijs Molenaar (Gijzelaar) as suggested in an other answer – RVH Jan 7 '12 at 22:27

To install OpenCV using the terminal on Ubuntu:

$ su -
# apt-get update
# apt-get install build-essential
# apt-get install libavformat-dev
# apt-get install x264 v4l-utils ffmpeg
# apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev

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.