4

I tried to install opencv on my raspberry pi (OS:Debian wheezy) following the site http://eduardofv.com/read_post/185-Installing-OpenCV-on-the-Raspberry-Pi

But when I entered the command it shows errors.

pi@raspberrypi ~ $ sudo apt-get install libpnglite-dev libpngwriter0-dev libpngwriter0c2 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libpngwriter0-dev
E: Unable to locate package libpngwriter0c2

Could you help me?

1
  • i have some errors, too. sudo apt-get install -y libv4l-0 libv4l-dev my raspberry is unable to locate these two packages. have someone a solution for this? (update and upgrade did not help)
    – user10196
    Oct 24, 2013 at 5:54

2 Answers 2

4

That tutorial is for the Squeeze version of Debian and you are using Wheezy.

Distribution upgrades often result in some packages being renamed, and others removed from the repositories. In this case, those two packages have both been removed. It appears that they are now built into one of the other packages, so your inability to install them wont effect the build.

Also note that the packages libavcodec53 and libavformat53 have changed name to libavcodec52 and libavformat52 respectively.

Let me know if you have any more issues.

4
  • Thank you, I done it. But I can't take video using my usb webcam. It shows error: OpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, file /home/pi/OpenCV-2.3.1/modules/highgui/src/cap_gstreamer.cpp, line 483 terminate called after throwing an instance of 'cv::Exception' what(): /home/pi/OpenCV-2.3.1/modules/highgui/src/cap_gstreamer.cpp:483: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open Aborted
    – sumith
    Sep 17, 2012 at 13:22
  • @sumith That information would be better asked in a new question, in case others are having the same problem :)
    – Jivings
    Sep 17, 2012 at 18:20
  • To avoid confusion - libavcodec52 in the original reference should be updated to libavcodec53 for Wheezy, and libavformat52 likewise. Dec 10, 2012 at 17:12
  • @DuncanMcGregor Libraries updated?
    – Jivings
    Dec 10, 2012 at 19:24
1

To save reading between the lines of @Jivings answer - the following worked for me

sudo apt-get install -y build-essential
sudo apt-get install -y cmake 
sudo apt-get install -y pkg-config 
sudo apt-get install -y libpng12-0 libpng12-dev libpng++-dev libpng3 
sudo apt-get install -y libpnglite-dev
sudo apt-get install -y zlib1g-dbg zlib1g zlib1g-dev 
sudo apt-get install -y pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools 
sudo apt-get install -y libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs 
sudo apt-get install -y ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev 
sudo apt-get install -y libgstreamer0.10-0-dbg libgstreamer0.10-0  libgstreamer0.10-dev 
sudo apt-get install -y libxine1-ffmpeg  libxine-dev libxine1-bin 
sudo apt-get install -y libunicap2 libunicap2-dev 
sudo apt-get install -y libdc1394-22-dev libdc1394-22 libdc1394-utils 
sudo apt-get install -y swig 
sudo apt-get install -y libv4l-0 libv4l-dev 
sudo apt-get install -y python-numpy 
sudo apt-get install -y libpython2.6 python-dev python2.6-dev 
sudo apt-get install -y libgtk2.0-dev pkg-config

wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2/download
tar -xf download
rm download
cd OpenCV-2.4.3
mkdir release
cd release

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
make
    # you wait, hours pass
sudo make install 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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