Dependencies 安装libgtk-3-dev,未满足的依赖项

Dependencies 安装libgtk-3-dev,未满足的依赖项,dependencies,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-standa

我正在尝试安装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


非常感谢您的帮助

为了满足依赖性要求,您必须降级某些包。您可以从调用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

对于ubuntu 18.04,在“更新”下的“软件和更新”中激活“推荐更新”允许我安装一个更新版本的libgtk-3-dev,而无需降级

我在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

Ton Chanh Le:您如何确定需要(重新)安装哪些版本的库?我有一个类似的问题:请看这里: