今天我将我的 ubuntu 从 16.04 LTS 升级到 18.04 LTS。升级成功。
但是当我尝试安装 vim 时,它抛出了错误。
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:
vim : Depends: libpython3.6 (>= 3.6.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我该如何解决?我尝试安装 libpython3.6,但它抛出了未满足的依赖项错误。
答案1
安装未满足的依赖项,直到其中一个依赖项不可用。安装该依赖项的 DEB 文件,然后重试。
答案2
您必须通过安装来修复损坏的依赖项默认 Python 版本对于 Ubuntu 18.04 LTS:
sudo apt-get install --reinstall libpython3.6=3.6.9-1~18.04ubuntu1.4 libpython3.6-minimal=3.6.9-1~18.04ubuntu1.4 libpython3.6-stdlib=3.6.9-1~18.04ubuntu1.4 python3.6=3.6.9-1~18.04ubuntu1.4 python3.6-minimal=3.6.9-1~18.04ubuntu1.4
然后安装 Vim。