无法安装简单扫描:您持有损坏的软件包

无法安装简单扫描:您持有损坏的软件包

在 ubuntu 18.04 上,当我运行时,sudo apt install simple-scan我得到:

The following packages have unmet dependencies.
 simple-scan : Depends: libsane1 (>= 1.0.24) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我见过其他人遇到过类似的包装损坏问题,但我试过的所有方法都不起作用。sudo dpkg --configure -a和都dpkg --get-selections | grep hold没有返回任何内容。但是,sudo apt-get dist-upgrade如果有帮助的话,输出以下内容:

The following packages have been kept back:
  colord
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

我想我以前曾使用过 PPA 进行简单扫描,但我很确定我现在没有 PPA。

编辑:回应 user535733 的评论:

$ sudo apt-cache policy simple-scan
simple-scan:
  Installed: (none)
  Candidate: 3.28.0-0ubuntu1
  Version table:
     3.28.0-0ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

$ sudo apt-cache policy libsane1
libsane1:
  Installed: (none)
  Candidate: 1.0.27-1~experimental3ubuntu2
  Version table:
     1.0.27-1~experimental3ubuntu2 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

编辑:Organic Marble 的评论:

$ sudo apt-cache policy colord
colord:
  Installed: 1.2.12-1ubuntu1
  Candidate: 1.3.3-2build1
  Version table:
     1.3.3-2build1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
 *** 1.2.12-1ubuntu1 100
        100 /var/lib/dpkg/status

编辑:尝试安装 libsane1 失败,并显示:

$ sudo apt install libsane1
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.
 libsane1 : Depends: libsane-common (= 1.0.27-1~experimental3ubuntu2) but 1.0.27+git20180317-xenial0 is to be installed
E: Unable to correct problems, you have held broken packages.

答案1

最后我提出这个“错误”Sebastien Bacher 给了我答案。由于旧的 PPA,我最终得到的是 1.0.27-1~experimental3ubuntu2 版本,而不是正确的 ubuntu 软件包。为了恢复 ubuntu 版本,我做了以下操作:

sudo apt-get install libsane1/bionic libsane-common/bionic sane-utils/bionic

然后我能够安装两者gnome-control-center(对于设置,它也依赖于colord)并且也simple-scan可以成功安装:

sudo apt install gnome-control-center
sudo apt install simple-scan

相关内容