
今天我將 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。