在 Ubuntu 20.04 上从 linuxuprising PPA 安装 Shutter 时出现“损坏的软件包”错误

在 Ubuntu 20.04 上从 linuxuprising PPA 安装 Shutter 时出现“损坏的软件包”错误

04 我想重新安装 Shutter。

我按照以下说明进行操作https://www.linuxuprising.com/2018/10/shutter-removed-from-ubuntu-1810-and.html(据称也适用于 20.04)

sudo add-apt-repository ppa:linuxuprising/shutter
sudo apt-get update
sudo apt install shutter

但是 Shutter 仍然无法安装:

 ~  sudo apt install shutter

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.
 shutter : Depends: libgnome2-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

有什么想法我可以如何安装它吗?

编辑

sudo apt-cache policy shutter
shutter:
  Installed: (none)
  Candidate: 0.94.3-1~0linuxuprising1~focal1
  Version table:
     0.94.3-1~0linuxuprising1~focal1 500
        500 http://ppa.launchpad.net/linuxuprising/shutter/ubuntu focal/main amd64 Packages
        500 http://ppa.launchpad.net/linuxuprising/shutter/ubuntu focal/main i386 Packages
     0.94-1 -1
        100 /var/lib/dpkg/status

然后尝试安装libgnome2-perl

libgnome2-perl : Depends: libgnomeui-0 (>= 2.22.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

尝试安装这个:

libgnomeui-0 : Depends: libgnome-keyring0 (>= 2.20.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

最后是这个

libgnome-keyring0 : Depends: libgnome-keyring-common (= 3.12.0-1build1~0ppa1~focal) but 3.12.0-1build1 is to be installed

答案1

您的输出sudo apt-cache policy shutter显示已经安装了某个版本的 shutter(/var/lib/dpkg/status实际安装或部分安装的版本),因此可能由于依赖关系中断而存在更新问题。

在这种情况下,我会尝试先删除有问题的软件包,然后重新安装,首先执行apt-get remove shutter,然后执行dpkg -P shutter,也许用--force-depends,然后是apt-get -f install。仔细观察最后一个命令的作用,因为它往往会删除其他也是问题一部分的软件包 - 有时甚至更多。

在我的系统上,刚刚从 18.04 升级到 20.04 并且不再安装快门,以下三行足以重新安装快门(可能在此期间修复了某些问题...):

sudo add-apt-repository ppa:linuxuprising/shutter
sudo apt-get update
sudo apt-get install shutter

相关内容