我正在尝试修复损坏的系统并找出缺少哪些依赖项。我向 apt-get 询问有关软件包的信息:
jon@jon-laptop:/var/log/apt$ sudo apt-get install -s openssh-server
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:
libumfpack5.7.1 : Depends: libcholmod3.0.6 but it is not going to be installed
openssh-server : Depends: openssh-client (= 1:7.1p2-2)
Depends: openssh-sftp-server but it is not going to be installed
Recommends: ssh-import-id but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
好的,上面说缺少 libcholmod3.0.6。然后我用以下命令检查:
jon@jon-laptop:/var/log/apt$ sudo apt-get install -s libcholmod3.0.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcholmod3.0.6 is already the newest version (1:4.4.6-1).
libcholmod3.0.6 set to manually installed.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
所以这表明它已经安装好了...这是怎么回事?
谢谢!
答案1
尝试运行
sudo apt-get -f install
答案2
我仍然不太明白 apt-get 的输出,但是我通过更改我使用的 Ubuntu 镜像解决了下划线问题。
旧镜子是:http://ubuntu.uhost.hk/
我改为:http://ftp.cuhk.edu.hk/pub/Linux/ubuntu
这是一个官方镜像,但停止更新(到目前为止已经过时了 2.5 个月!)。我想我可能在已经更新到软件包后换到了镜像更新比镜像更糟糕。这就是为什么 apt-get 会如此困惑(我也是!)。