当我运行时,sudo apt-get update
它显示以下内容:
$ sudo apt-get update
Get:1 http ://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http ://in.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http ://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http ://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 102 kB in 2s (51.1 kB/s)
Reading package lists... Done
之后当我运行时sudo apt-get upgrade
它显示:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
cups : Depends: cups-daemon (>= 2.1.3-4ubuntu0.2)
cups-core-drivers : Depends: cups-daemon (>= 2.1.3-4ubuntu0.2)
cups-daemon : Depends: libcups2 (= 2.1.3-4) but 2.1.3-4ubuntu0.2 is installed
E: Unmet dependencies. Try using -f.
有什么解决办法吗?
答案1
运行dpkg -l | egrep '^ii.*cups'
以查看已安装的所有 CUPS 软件包。如果其中一些软件包的版本为2.1.3-4ubuntu0.2
,请使用以下命令将其恢复为2.1.3-4
版本
sudo apt install package1=2.1.3-4 package2=2.1.3-4 ...