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

Installing libgtk-3-dev, unmet dependencies

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

1
2
3
4
5
6
7
8
9
10
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:

1
sudo apt-get install libgtk-3-dev

这是输出:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 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 时返回的错误消息中获取降级版本。例如,使用消息

1
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

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

安装libglib2.0-dev之前

1
sudo apt-get install libglib2.0-dev

在安装 libgtk-3-dev

之前,您必须(重新)安装一些其他软件包

1
2
3
4
5
6
7
8
9
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,激活"软件"中的"推荐更新"


n