Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink.

1616 ワード

Ubuntuのアップグレードで次の問題が発生しました:Your python 3 install is corrupted.Please fix the ‘/usr/bin/python3’ symlink.
エラーメッセージに誤導され、python 3リンクに問題があるのかと思い、いくつかの方法を試してみたが、問題は解決しなかった.
➜  ~ cat /var/log/dist-upgrade/main.log
2019-12-24 20:51:02,719 INFO Using config files '['./DistUpgrade.cfg.bionic']'
2019-12-24 20:51:02,720 INFO uname information: 'Linux liuruyi-All-Series 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64'
2019-12-24 20:51:04,072 INFO apt version: '1.6.12'
2019-12-24 20:51:04,073 INFO python version: '3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0]'
2019-12-24 20:51:04,083 INFO release-upgrader version '19.04.16.9' started
2019-12-24 20:51:04,301 INFO locale: 'en_US' 'UTF-8'
2019-12-24 20:51:04,751 DEBUG Using 'DistUpgradeViewGtk3' view
2019-12-24 20:51:04,863 DEBUG enable dpkg --force-overwrite
2019-12-24 20:51:04,897 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2019-12-24 20:51:12,200 DEBUG lsb-release: 'bionic'
2019-12-24 20:51:12,202 DEBUG _pythonSymlinkCheck run
2019-12-24 20:51:12,204 DEBUG python symlink points to: '/usr/bin/python3.6', but expected is 'python2.7' or '/usr/bin/python2.7'
2019-12-24 20:51:12,204 ERROR pythonSymlinkCheck() failed, aborting

実際の問題はpython symlink points to:'/usr/bin/python 3.6’, but expected is ‘python2.7’ or '/usr/bin/python2.7’
➜  ~ sudo ln -sf /usr/bin/python2.7 /usr/bin/python
➜  ~ update-manager -c

それでいいです.