执行命令 sudo apt-get install libopencv-dev
报错如下:
The following packages have unmet dependencies:
libopencv-dev : Depends: libopencv-objdetect-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv-highgui-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv-legacy-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv-contrib-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv-videostab-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv-superres-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv-ocl-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libcv-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libhighgui-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libcvaux-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
尝试解决方案:
1.执行命令 sudo apt-get -f install xxx 该命令无效
2.sudo aptitude install xxx. 该命令是有效的,要注意 不接受未安装方案,接受降级方案。搞定。