
今日、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
満たされていない依存関係をインストールして、依存関係の 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をインストールします。