(Ubuntu 14.04)apt-get libopencv-dev,但出现错误:无法纠正问题,您持有损坏的软件包 [英] (Ubuntu 14.04) apt-get libopencv-dev, but get errors: Unable to correct problems, you have held broken packages

查看:981
本文介绍了(Ubuntu 14.04)apt-get libopencv-dev,但出现错误:无法纠正问题,您持有损坏的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正在阅读包裹清单...已完成 构建依赖关系树
正在读取状态信息...完成 某些软件包无法安装.这可能意味着您有 请求一个不可能的情况,或者如果您使用的是不稳定的情况 分发一些尚未创建的必需软件包 或已移出收入". 以下信息可能有助于解决这种情况:

Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve 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.

另外,我使用了"aptitude install libopencv-dev",但是没有用.所以我不知道如何解决这个问题.

also, I used "aptitude install libopencv-dev", but it did not work. So I don't know how to finished this problem.

推荐答案

官方存储库中的软件包已过时,请不要使用它们.这就是我用来安装OpenCV的工具,也应该对您有用.

The packages in the official repos are outdated, don't use them. This is what I use to install OpenCV, should work for you too.

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

这篇关于(Ubuntu 14.04)apt-get libopencv-dev,但出现错误:无法纠正问题,您持有损坏的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆