我试图在ubuntu 14上安装libgtk2.0-dev但是出现了一些错误

时间:2017-03-11 17:46:23

标签: c++ opencv ubuntu-14.04

$ sudo apt-get install libgtk2.0-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:
 libgtk2.0-dev : Depends: libglib2.0-dev (>= 2.27.3) but it is not going to be installed
                 Depends: libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not going to be installed
                 Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
                 Depends: libatk1.0-dev (>= 1.29.2) but it is not installable
                 Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
                 Depends: libxext-dev (>= 1:1.0.1-2) but it is not going to be installed
                 Depends: libxinerama-dev (>= 1:1.0.1-4.1) but it is not going to be installed
                 Depends: libxi-dev (>= 1:1.0.1-4) but it is not going to be installed
                 Depends: libxrandr-dev (>= 1:1.2.99)
                 Depends: libxcursor-dev but it is not going to be installed
                 Depends: libxfixes-dev (>= 1:3.0.0-3) but it is not going to be installed
                 Depends: libxcomposite-dev (>= 1:0.2.0-3) but it is not installable
                 Depends: libxdamage-dev (>= 1:1.0.1-3) but it is not installable
E: Unable to correct problems, you have held broken packages.

1 个答案:

答案 0 :(得分:1)

好像你破了包,试试这个命令:

sudo apt-get -f install

如果它也不起作用,尝试在ubuntu软件中心安装synaptic包管理器,运行它,搜索任何破坏的依赖项并卸载它们......然后,从那里搜索GTK库,然后安装它们。

如果仍然无效,请尝试命令aptitude。如果没有安装,请通过在终端上运行来安装它:

sudo apt-get install aptitude

然后,运行: sudo aptitude install libgtk2.0-dev

相关问题