无法在 ubuntu 16.04 上安装 libgtk2.0-dev

Al *_*mun 6 package-management gtk-2 16.04

在安装 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 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.
Run Code Online (Sandbox Code Playgroud)

我尝试了很多东西,比如 -f 标志,突触,单独安装它们,一次安装所有依赖项,但一切都失败了。

ubuntu 16.04 不支持 libgtk2.0-dev 吗?

编辑:输出 apt-cache policy libgtk2.0-dev libglib2.0-dev

libgtk2.0-dev:
  Installed: (none)
  Candidate: 2.24.30-1ubuntu1
  Version table:
     2.24.30-1ubuntu1 500
        500 http://mirror.dhakacom.com/ubuntu-archive xenial/main amd64 Packages
libglib2.0-dev:
  Installed: (none)
  Candidate: 2.48.0-1ubuntu4
  Version table:
     2.48.0-1ubuntu4 500
        500 http://mirror.dhakacom.com/ubuntu-archive xenial/main amd64 Packages
Run Code Online (Sandbox Code Playgroud)

Al *_*mun 5

我是如何解决问题的: 我尝试手动安装这些依赖项。首先尝试安装,sudo apt-get install libglib2.0-dev但出现以下错误:

The following packages have unmet dependencies:
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.1-1~ubuntu16.04.1 is to be installed
                  Depends: libglib2.0-bin (= 2.48.0-1ubuntu4)
Run Code Online (Sandbox Code Playgroud)

然后我尝试与 glib 一起安装 glibs 依赖项: sudo apt-get install libglib2.0-dev libglib2.0-0=2.48.0-1ubuntu4

这次包安装成功。

在那之后我发出了sudo apt-get install libgtk2.0-dev它的工作原理!