依赖项错误:无法安装 Anjuta IDE

依赖项错误:无法安装 Anjuta IDE

我无法使用 Gnome 3.16 DE 在 Ubuntu 15.04 中安装 anjuta studio。

这是终端的输出:

shivam@shivam-Inspiron-3521:~$ sudo apt-get install libjavascriptcoregtk-2.4.9-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libjavascriptcoregtk-2.4.9-0
E: Couldn't find any package by regex 'libjavascriptcoregtk-2.4.9-0'
shivam@shivam-Inspiron-3521:~$ sudo apt-get install anjuta
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:
 anjuta : Depends: libdevhelp-3-2 (>= 3.12.0-2~) but it is not going to be installed
          Depends: libwebkit2gtk-3.0-25 (>= 2.0.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

这是 apt-cache 的输出:

$ sudo apt-cache policy anjuta libdevhelp-3-2 libwebkit2gtk-3.0-25
anjuta:
  Installed: (none)
  Candidate: 2:3.14.0-1
  Version table:
     2:3.14.0-1 0
        500 http://in.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages
libdevhelp-3-2:
  Installed: (none)
  Candidate: 3.14.0-1
  Version table:
     3.14.0-1 0
        500 http://in.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
libwebkit2gtk-3.0-25:
  Installed: (none)
  Candidate: 2.4.8-1ubuntu2
  Version table:
     2.4.8-1ubuntu2 0
        500 http://in.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages

安装的另一个输出:

$ sudo apt-get install libdevhelp-3-2 libwebkit2gtk-3.0-25
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:
 libwebkit2gtk-3.0-25 : Depends: libjavascriptcoregtk-3.0-0 (= 2.4.8-1ubuntu2) but 2.4.9-0ubuntu1~15.04~webkitteam1 is to be installed
E: Unable to correct problems, you have held broken packages.

apt-cache 的另一个输出:

shivam@shivam-Inspiron-3521:~$ sudo apt-cache policy libjavascriptcoregtk-3.0-0
libjavascriptcoregtk-3.0-0:
  Installed: 2.4.9-0ubuntu1~15.04~webkitteam1
  Candidate: 2.4.9-0ubuntu1~15.04~webkitteam1
  Version table:
 *** 2.4.9-0ubuntu1~15.04~webkitteam1 0
        100 /var/lib/dpkg/status
     2.4.8-1ubuntu2 0
        500 http://in.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages

答案1

您可以安装以下软件包

  • libjavascriptcoregtk-1.0-0 (2.4.8-1ubuntu)
  • libjavascriptcoregtk-3.0-0 (2.4.8-1ubuntu2)
  • libjavascriptcoregtk-4.0-18 (2.6.2+dfsg1-4ubuntu1)

但不是libjavascriptcoregtk-2.4.9-0


你呢ppa:webkit-team因此请先安装系统中的PPA libjavascriptcoregtk-3.0-0 (2.4.9-0ubuntu1~15.04~webkitteam1)如果您(再次)需要 PPA,请跳至我的答案末尾并忽略后续步骤。


问题是,libwebkit2gtk-3.0-25标准 Ubuntu 存储库需要的正是libjavascriptcoregtk-3.0-0 (2.4.8-1ubuntu2)

libjavascriptcoregtk-3.0-0快速解决方案是,通过以下方式降级软件包

sudo apt-get install libjavascriptcoregtk-3.0-0=2.4.8-1ubuntu2

但你应该使用下面的命令降级所有由 PPA 升级的软件包ppa:webkit-team

sudo apt-get install ppa-purge
sudo apt-add-repository ppa:webkit-team
sudo apt-get update
sudo ppa-purge ppa:webkit-team

将来,使用ppa-purge它从您的系统中删除 PPA。


如果您需要 PPA,请再次添加并使用它,您的问题也将得到解决

sudo apt-add-repository ppa:webkit-team
sudo apt-get update
sudo apt-get dist-upgrade

相关内容