Install OpenCV 2.4.8 on Ubuntu 13.10

Following are the instructions to install OpenCV on Ubuntu machine. I am using latest version of OpenCV 2.4.8 and latest version of Ubuntu 13.10. For old versions (2.3 and earlier) of OpenCV you can follow my earlier blog post here. Installing new version of OpenCV is slightly different hence I am presenting this post.

Following steps will guide you to install OpenCV 2.4.8 on Ubuntu 13.10

1. First we will install essential tools for buidling OpenCV. Use following command in your terminal to install them.

sudo apt-get install build-essential cmake pkg-config

2. Following command will install required Image I/O libraries.

sudo apt-get install libjpeg62-dev libtiff4-dev libjasper-dev

3. Install gtk libraries for highgui

sudo apt-get install  libgtk2.0-dev

4. Install required video libraries.

sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev

5. Download OpenCV from sourceforge using below link and extract zipped file. Enter into zipped directly.

6. Create a build directory in zipped file and enter into it using following terminal command.

mkdir build
cd build

7. Type following command in terminal window to start building process.


8.  Compile the source code using following command.


9.  Install OpenCV using following command.

sudo make install

Now your machine is ready to rock with OpenCV. 


  1. very helpful, thanks.

    1. I am glad that my post helped :)

    2. I have read your blog its very attractive and impressive. I like it your blog.

      Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

      Java Online Training Java Online Training JavaEE Training in Chennai Java EE Training in Chennai

  2. Getting an error after following the 7th step. Please help.

    -- Configuring incomplete, errors occurred!

    1. didn't work for me either, try this one:

  3. Also get errors on 7th.. Followed every bit, except I had to replace libjpeg62-dev with libjpeg-dev because of compatibility coplaints.

  4. Check for the mentioned problems. Or better follow if you are using Ubuntu. Installation is silent without output for a few minutes right after the start. But then it works smoothly.

  5. step 7 worked for me after I executed this:
    sudo apt-get install libqt4-core libqt4-dev libqt4-gui qt4-dev-tools

  6. To work on OpenCV with Python visit --

  7. Step 7: it is missing C before MAKE, so this is the correct way
    -D CMAKE_INSTALL_PREFIX=/usr/local

  8. Hello. I am using Ubuntu 12.04.
    and i want to install OpenCV 2.4.8.
    I want to ask that will this guide work on Ubuntu 12.04? Have anyone tried this guide over Ubuntu 12.04?
    And how to configure OpenCV with CodeBlocks IDE?
    Any help will be highly appreciated. Thanks.

    1. Process should be pretty much similar. Try to follow above blog post and see if it works

  9. for everybody getting stuck at step 7, you might consider trying the following:
    (works for ubuntu 14.1, should work for previous versions also)
    >type 'sudo synaptic' on terminal
    >search for qt4-default and install it.

    The thing is that installing via synaptic installs all the dependencies implicitly, which doesn't lead to broken packages you might be facing.

  10. Herpes, a very hot topic these days, almost everyone is suffering from this, i am also suffering from this disease. And we all know that there is no cure for the herpes. But now days some of the sompanies are claiming that they discovered the herpes cure. I don't know they are original or fakes but i tryed one of these. And the Herpes Natural Cure they provided is really so good. I don't face any symptoms of herpes till now. To go to that website just Click Here .

  11. I am sure this post has helped me save many hours of browsing other related posts just to find what I was looking for. Many thanks!

    angularjs6-Training in chennai

    angularjs Training in online

    angularjs4-Training in online

    angularjs-Training in tambaram

  12. I like your blog, I read this blog please update more content on python, further check it once at python online training

  13. Hiv disease for the last 3 years and had pain hard to eat and cough are nightmares,especially the first year At this stage, the immune system is severely weakened, and the risk of contracting opportunistic infections is much greater. However, not everyone with HIV will go on to develop AIDS. The earlier you receive treatment, the better your outcome will be.I started taking ARV to avoid early death but I had faith in God that i would be healed someday.As a Hiv patent we are advise to be taking antiretroviral treatments to reduce our chance of transmitting the virus to others , few weeks ago i came on search on the internet if i could get any information on Hiv treatment with herbal medicine, on my search i saw a testimony of someone who has been healed from Hiv her name was Achima Abelard and other Herpes Virus patent Tasha Moore also giving testimony about this same man,Called Dr Itua Herbal Center.I was moved by the testimony and i contacted him by his We chatted and he send me a bottle of herbal medicine I drank it as he instructed me to.After drinking it he ask me to go for a test that how i ended my suffering life of Hiv patent,I'm cured and free of Arv Pills.I'm forever grateful to him Drituaherbalcenter.Here his contact Number +2348149277967...He assure me he can cure the following disease..Hiv,Cancer,Herpes Virus,Epilepsy, fibromyalgia ,ALS,Hepatitis,Copd,Parkinson disease.Genetic disease,Fibrodysplasia Ossificans Progressiva,Factor V Leiden Mutation ,Fatal Familial Insomnia ,Dupuytren's disease,Fibrodysplasia Ossificans Progressiva,Fluoroquinolone Toxicity Syndrome,Inflammatory bowel disease ,Huntington's disease ,Diabetes,Fibroid...

  14. I love the information you provide here and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my cell phone. I’m not even using WIFI, just 3G. Anyways, awesome blog!
    nebosh course in chennai

  15. Nice blog..! I really loved reading through this article. Thanks for sharing such an amazing post with us and keep blogging...Well written article Thank You for Sharing with Us pmp training institute in chennai | pmp training in chennai | pmp training class in chennai | pmp training near me | pmp training courses online | pmp training fee

  16. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
    Data Science training in Chennai
    Data science training in Bangalore
    Data science training in pune
    Data science online training
    Data Science Interview questions and answers
    Data Science Tutorial

  17. python training chennai|python training institute in chennai
    Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.

  18. Very nice blog. A great and very informative post, Keep up the good work!

    ExcelR Data Science

  19. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.
    date analytics certification training courses
    data science courses training

  20. I'm happy to see the considerable subtle element here!.
    Data Science Course in Pune

  21. I really enjoyed reading this post, big fan. Keep up the good work andplease tell me when can you publish more articles or where can I read more on the subject?


  22. You might comment on the order system of the blog. You should chat it's splendid. Your blog audit would swell up your visitors. I was very pleased to find this site.I wanted to thank you for this great read!!
    Data Science Courses

  23. This is an awesome blog. Really very informative and creative contents. This concept is a good way to enhance the knowledge. Thanks for sharing.
    ExcelR business analytics course

  24. Wow! this is Amazing! Do you know your hidden name meaning ? Click here to find your hidden name meaning