我一直在尝试使用以下sudo apt-get install cups
命令安装 CUPS,但它无法安装,而是收到以下错误消息:
sudo apt-get install cups
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:
cups : Depends: libcups2 (= 2.2.1-8) but 2.2.3-2 is to be installed
Depends: libcupscgi1 (>= 1.4.2) but it is not going to be installed
Depends: libcupsmime1 (>= 1.4.0) but it is not going to be installed
Depends: libcupsppdc1 (>= 1.4.0) but it is not going to be installed
Depends: cups-core-drivers (>= 2.2.1-8)
Depends: cups-daemon (>= 2.2.1-8)
Depends: cups-ppdc
Recommends: printer-driver-gutenprint but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我已尝试安装它提示的未满足的依赖项,但它仍然没有进行任何更改。我也运行了我的sudo apt update
,更新后,我再次尝试了它,但它给出了相同的错误消息。在网上查找解决方案时,我偶然发现了这一点:
cups :取决于:libcups2 (= 2.1.3-4) 但要安装 2.1.3-4ubuntu0.2,做了所有建议的事情,但没有一个有帮助。
请任何人都可以帮助我。
我正在使用 Kali linux (Debian) [4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux ]
先感谢您
答案1
你的sources.list
应仅包含以下行:
deb http://http.kali.org/kali kali-rolling main contrib non-free
debian 存储库可能会破坏您的系统,要编辑您的sources.list,请使用以下命令:
echo deb http://http.kali.org/kali kali-rolling main contrib non-free > /etc/apt/sources.list
然后升级您的软件包并尝试修复损坏的依赖项。
apt update ; apt upgrade ; apt dist-upgrade
apt -f install