(Ubuntu 14.04) apt-get libopencv-dev, but getting errors: failed to fix problems, you had broken packages

Reading package lists ... Done Creating a dependency tree
Reading status information ... Done Some packages cannot be installed. This may mean that you have requested an impossible situation or if you are using unstable that some necessary packages have not yet been created or withdrawn from Incoming. The following information may help in resolving the situation:

The following packages have unmet dependencies:
 libopencv-dev : Depends: libopencv-objdetect-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libopencv-highgui-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libopencv-legacy-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libopencv-contrib-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libopencv-videostab-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libopencv-superres-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libopencv-ocl-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libcv-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libhighgui-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
                 Depends: libcvaux-dev (= 2.4.8+dfsg1-2ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

In addition, I used "aptitude install libopencv-dev", but that did not work. Therefore, I do not know how to end this problem.

+4
source share
2

, . , OpenCV, .

sudo apt-get install build-essential make cmake git libgtk2.0-dev pkg-config python python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev libjpeg-dev libpng-dev libtiff-dev
cd ~/Downloads
git clone https://github.com/itseez/opencv
mv opencv /opt
cd /opt/opencv
git checkout 2.4.10.1 #or whatever version you want
sudo mkdir build
cd build
sudo cmake -j4 -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
sudo make -j4
sudo make -j4 install
sudo ldconfig

http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html

+7

OpenCV 3.2 , ubuntu 14.04.5:

  • :

sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff- dev libjasper-dev libdc1394-22-dev

  1. opencv http://opencv.org/downloads.html

  2. , cd :

mkdir build

cd build

cmake -D CMAKE_BUILD_TYPE = RELEASE -D CMAKE_INSTALL_PREFIX =/usr/local -D WITH_TBB = ON -D BUILD_NEW_PYTHON_SUPPORT = ON -D WITH_V4L = ON -D INSTALL_C_EXAMPLES = ON -D INSTALL_PYTHON_EXAMPLES = ON -D BUILD_EXAMPLES = ON -D WITH_QT = OFF -D WITH_OPENGL = ON -D WITH_OPENCL = ON -D WITH_VA_INTEL = ON -D BUILD_SHARED_LIBS = ON..

make -j8 # 8

sudo make install

" LD_LIBRARY_PATH =/usr/local/lib/: $LD_LIBRARY_PATH" .bashrc

sudo ldconfig

,

0

All Articles