我尝试使用以下方法在我的发行版上安装GTK +库:
sudo apt-get install libgtk-3-dev
但是我收到这些日志(错误):
The following packages have unmet dependencies:
libgtk-3-dev : Depends: libgtk-3-0 (= 3.10.8-0ubuntu1.6) but 3.14.15-0ubuntu1~14.04~ricotz1 is to be installed
Depends: gir1.2-gtk-3.0 (= 3.10.8-0ubuntu1.6) but 3.14.15-0ubuntu1~14.04~ricotz1 is to be installed
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
Depends: libwayland-dev (>= 1.2.0) but it is not going to be installed
Depends: libxkbcommon-dev but it is not going to be installed
Depends: libxi-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我最近开始使用unix系统,所以我不知道如何解决这个问题。
任何帮助将不胜感激。
答案 0 :(得分:0)
经过一番严肃的谷歌搜索和阅读所有错误后,我发现这是一个微妙的情况。显然,对此没有单一的答案,如果它不是正确的答案。
我尝试过以下方法:
建议使用aptitude进行此类工作,因为aptitude提供了冲突解决程序,它基本上可视化未满足的依赖项(并尝试解决它们)。
sudo apt-get update
sudo apt-get install aptitude
然后
sudo aptitude install libgtk-3-dev
即使在大多数情况下这会解决问题,但它没有100%的成功率。
有不同的方法,比如清理apt cache
,(它对我不起作用)然后使用:sudo apt-get install libgtk-3-dev -f
,它将尝试修复破坏的依赖项。
有太多方法,我所学到的只有post。
注意 - &gt; 我可能因为我的linux发行版而遇到这个特殊问题,我读过它不是很稳定,建议从一些更稳定可靠的版本开始,如:Debian或Ubuntu。(适合初学者)< /强>