安装libgtk-3-dev,unmet依赖项

时间:2016-08-03 19:34:44

标签: dependencies

我正在尝试安装seahorse-3.16.0。运行./configure时,我得到:

configure: error: Package requirements (gtk+-3.0 >= 3.4.0) were not met:

No package 'gtk+-3.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

我尝试用:

安装libgtk-3-dev
sudo apt-get install libgtk-3-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:
  libgtk-3-dev : Depends: libglib2.0-dev (>= 2.37.5) but it is not going to be installed
                 Depends: libgdk-pixbuf2.0-dev (>= 2.27.1) but it is not going to be installed
                 Depends: libpango1.0-dev (>= 1.32.4) but it is not going to be installed
                 Depends: libatk1.0-dev (>= 2.7.5) but it is not going to be installed
                 Depends: libatk-bridge2.0-dev but it is not going to be installed
                 Depends: libcairo2-dev (>= 1.13.0~20140204) but it is not going to be installed
 E: Unable to correct problems, you have held broken packages.

我已经尝试过安装单个软件包,但它们归结为依赖于已经存在的东西并且一直都是最新的。我也尝试用aptitude安装libgtk-3-dev,我已经多次运行sudo apt-get update和sudo apt-get upgrade。

感谢任何和所有帮助。

3 个答案:

答案 0 :(得分:2)

您必须降级某些软件包才能满足依赖性要求。您可以从调用apt-get install时返回的错误消息中获取降级版本。例如,带有消息

libglib2.0-dev : Depends: libglib2.0-0 (= 2.40.0-2) but 2.40.2-0ubuntu1 is to be installed

您需要将libglib2.0-0降级为版本2.40.0-2

sudo apt-get install libglib2.0-0=2.40.0-2

安装libglib2.0-dev之前

sudo apt-get install libglib2.0-dev

安装libgtk-3-dev之前必须(重新)安装的其他一些软件包

sudo apt-get install libcairo2=1.13.0~20140204-0ubuntu1 libcairo-gobject2=1.13.0~20140204-0ubuntu1

sudo apt-get install libcairo2-dev

sudo apt-get install libpango-1.0-0=1.36.3-1ubuntu1 libpangocairo-1.0-0=1.36.3-1ubuntu1 libpangoft2-1.0-0=1.36.3-1ubuntu1 libpangoxft-1.0-0=1.36.3-1ubuntu1 gir1.2-pango-1.0=1.36.3-1ubuntu1

sudo apt-get install libpango1.0-dev

sudo apt-get install libgtk-3-dev

答案 1 :(得分:2)

对于ubuntu 18.04,激活“更新”下“软件和更新”中的“推荐更新”使我可以安装libgtk-3-dev的较新版本,而无需进行任何降级。

答案 2 :(得分:1)

我在Ubuntu 19.10上也遇到了同样的问题。我先运行这个:

sudo apt-get -f install libpcre3=2:8.39-12

然后所有的软件包都安装好了:

sudo apt-get -f install libpcre3-dev
sudo apt-get install libglib2.0-dev
sudo apt-get install libatspi2.0-dev
sudo apt-get install libatk-bridge2.0-dev
sudo apt-get install libgtk-3-dev

HTH