我将 ubuntu 升级到 15.10,然后尝试编译 gtk 应用程序,却发现我没有安装 GTK。
所以我跑了
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: libegl1-mesa-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我该如何修复这个问题?我不知道为什么会有这些“未满足的依赖关系”... ppa 方面出了什么问题?
答案1
当您收到you have held broken packages
错误消息时,
执行sudo apt-get install -f
,这将修复它。
手册页中的更多信息:
-f, --fix-broken
Fix; attempt to correct a system with broken dependencies in place.
This option, when used with install/remove, can omit any packages
to permit APT to deduce a likely solution. If packages are
specified, these have to completely correct the problem. The option
is sometimes necessary when running APT for the first time; APT
itself does not allow broken package dependencies to exist on a
system. It is possible that a system's dependency structure can be
so corrupt as to require manual intervention (which usually means
using dpkg --remove to eliminate some of the offending packages).
Use of this option together with -m may produce an error in some
situations. Configuration Item: APT::Get::Fix-Broken.