我正在尝试在 ubuntu 14.04 嵌入式 Zynq SoC 处理器上安装 opencv
linaro@linaro-nano:~$ sudo apt-get update
Ign http://ports.ubuntu.com trusty InRelease
Ign http://ppa.launchpad.net trusty InRelease
Hit http://ports.ubuntu.com trusty Release.gpg
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://ports.ubuntu.com trusty Release
Hit http://ppa.launchpad.net trusty Release
Hit http://ports.ubuntu.com trusty/main Sources
Hit http://ppa.launchpad.net trusty/main Sources
Hit http://ports.ubuntu.com trusty/universe Sources
Hit http://ppa.launchpad.net trusty/main armhf Packages
Hit http://ports.ubuntu.com trusty/main armhf Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://ports.ubuntu.com trusty/universe armhf Packages
Hit http://ports.ubuntu.com trusty/main Translation-en
Hit http://ports.ubuntu.com trusty/universe Translation-en
Reading package lists... Done
linaro@linaro-nano:~$ sudo apt-get install pkg-config build-essential libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
pkg-config is already the newest version.
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.
linaro@linaro-nano:~$ sudo apt-get install libopencv-objdetect-dev libopencv-highgui-dev libopencv-legacy-dev libopencv-contrib-dev libopencv-videostab-dev libopencv-superres-dev libcvaux-dev libhighgui-dev libcv-dev libopencv-ocl-dev pkg-config build-essential libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
pkg-config is already the newest version.
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-highgui-dev : Depends: libgtk2.0-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
linaro@linaro-nano:~$ sudo apt-get install libgtk2.0-dev libopencv-objdetect-dev libopencv-highgui-dev libopencv-legacy-dev libopencv-contrib-dev libopencv-videostab-dev libopencv-superres-dev libcvaux-dev libhighgui-dev libcv-dev libopencv-ocl-dev pkg-config build-essential libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
pkg-config is already the newest version.
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:
libgtk2.0-dev : Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
linaro@linaro-nano:~$ sudo apt-get install libcairo2-dev libpango1.0-dev libgtk2.0-dev libopencv-objdetect-dev libopencv-highgui-dev libopencv-legacy-dev libopencv-contrib-dev libopencv-videostab-dev libopencv-superres-dev libcvaux-dev libhighgui-dev libcv-dev libopencv-ocl-dev pkg-config build-essential libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
pkg-config is already the newest version.
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:
libcairo2-dev : Depends: libfontconfig1-dev (>= 2.2.95) but it is not going to be installed
Depends: libfreetype6-dev (>= 2.1.10) but it is not going to be installed
libpango1.0-dev : Depends: libfreetype6-dev but it is not going to be installed
Depends: libxft-dev but it is not going to be installed
Depends: libfontconfig1-dev (>= 2.10.91) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
linaro@linaro-nano:~$ sudo apt-get install libfontconfig1-dev libxft-dev libfreetype6-dev libfontconfig1-dev libcairo2-dev libpango1.0-dev libgtk2.0-dev libopencv-objdetect-dev libopencv-highgui-dev libopencv-legacy-dev libopencv-contrib-dev libopencv-videostab-dev libopencv-superres-dev libcvaux-dev libhighgui-dev libcv-dev libopencv-ocl-dev pkg-config build-essential libopencv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
pkg-config is already the newest version.
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:
libfreetype6-dev : Depends: libfreetype6 (= 2.5.2-1ubuntu2) but 2.5.2-1ubuntu2.2 is to be installed
E: Unable to correct problems, you have held broken packages.
答案1
您要安装的软件包需要特定版本的libfreetype6-dev
软件包,但您似乎安装了稍新的版本。不幸的是,您要安装的配置为仅接受一个特定版本,而不是该版本和较新的版本(出于什么原因?我不知道)。libfreetype6
2.5.2-1ubuntu2
libfreetype6-dev
libfreetype6
为了解决依赖性问题,您可以libfreetype6
通过强制 apt-get 安装请求的版本来降级:
sudo apt-get install libfreetype6=2.5.2-1ubuntu2