![由于 libsane-common 版本错误,colord 软件包被阻止](https://linux22.com/image/1012554/%E7%94%B1%E4%BA%8E%20libsane-common%20%E7%89%88%E6%9C%AC%E9%94%99%E8%AF%AF%EF%BC%8Ccolord%20%E8%BD%AF%E4%BB%B6%E5%8C%85%E8%A2%AB%E9%98%BB%E6%AD%A2%20.png)
运行sudo apt upgrade
报告
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
libieee1284-3:i386
Use 'sudo apt autoremove' to remove it.
The following packages have been kept back:
colord
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
这让我认为有些东西坏了。看来这个包依赖于 libsane1,但尝试安装它时出现以下错误消息:
The following packages have unmet dependencies:
libsane1 : Depends: libsane-common (= 1.0.27-1~experimental3ubuntu2) but 1.0.27+git20190324-xenial0 is to be installed
Recommends: sane-utils (>= 1.0.27-1~experimental3ubuntu2)
sudo apt install libsane-common=1.0.27-1~experimental3ubuntu2
尝试直接安装正确的版本
dpkg: error processing archive /var/cache/apt/archives/libsane1_1.0.27-1~experimental3ubuntu2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libsane.so.1.0.27', which is also in package libsane:amd64 1.0.27+git20190324-xenial0
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
我也打算尝试卸载并重新安装 libsane-common,但sudo apt remove libsane-common --dry-run
打印
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
colord-data libcolord-gtk1 libcolorhug2 libieee1284-3 libieee1284-3:i386 libnss-myhostname
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
colord gnome-control-center libsane libsane-common ubuntu-desktop
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Remv ubuntu-desktop [1.417]
Remv gnome-control-center [1:3.28.2-0ubuntu0.18.04.2]
Remv colord [1.2.12-1ubuntu1]
Remv libsane [1.0.27+git20190324-xenial0]
Remv libsane-common [1.0.27+git20190324-xenial0]
这似乎相当危险,因为它会因为某些奇怪的原因卸载 ubuntu-desktop 和 gnome-control-center。有没有办法可以解决这个问题而不会破坏我的整个安装?
编辑:命令sudo apt autoremove
和sudo apt clean
运行没有错误。运行sudo apt install colord
给出错误
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:
colord : Depends: libsane1 (>= 1.0.24) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
答案1
我最终鼓起勇气,通过运行解决了这个问题
sudo dpkg --purge --force-depends libsane libsane-common
强制删除有问题的软件包而不卸载任何核心 Ubuntu 软件包,然后
sudo apt --fix-broken install
帮我解决了所有问题。