在 Ubuntu 18.04 上安装 libgtk-3-dev 时出现依赖问题

在 Ubuntu 18.04 上安装 libgtk-3-dev 时出现依赖问题

我正在尝试安装 libgtk-3-dev 并收到以下消息:

user@nvidia-jetson-tx2:~/projects/realsense/librealsense$ sudo apt-get install libgtk-3-dev
[sudo] password for user: 
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 resolve the situation:

The following packages have unmet dependencies:
 libgtk-3-dev : Depends: libgtk-3-0 (= 3.22.30-1ubuntu1) but 3.22.30-1ubuntu4 is to be installed
                Depends: gir1.2-gtk-3.0 (= 3.22.30-1ubuntu1) but 3.22.30-1ubuntu4 is to be installed
                Depends: libpango1.0-dev (>= 1.40.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.14.0) but it is not going to be installed
                Depends: libxkbcommon-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

如果我的理解正确,libgtk-3-dev 中定义的依赖项正在寻找旧版本的libgtk-3-0gir1.2-gtk-3.0。针对这两个包的最佳处理方案是什么:

  • 降级libgtk-3-0gir1.2-gtk-3.0
  • 强制安装libgtk-3-dev通过某种方式忽略依赖关系(不确定这是否可能)
  • 修改依赖关系(如果可能)
  • 还有别的吗?

那其他 4 个包呢(libpango1.0-dev、libatk-bridge2.0-dev、libcairo2-dev、libxkbcommon-dev)? 由于版本标准而未安装libgtk-3-0gir1.2-gtk-3.0没有满足要求或者可能还存在其他问题?

有人可以指导我如何进行吗?

提前谢谢您!

答案1

感谢 Terrance 为我指明正确的方向。

libgtk-3-dev 3.22.30-1ubuntu4必须在软件和更新->更新下启用“推荐更新(bionic-update)”,之后即使没有明确指定版本,我也能够安装。

推荐更新(bionic-update)

相关内容