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

升级Ubuntu遇到下面问题:
Your python3 install is corrupted. Please fix the ‘/usr/bin/python3’ symlink.

被错误提示误导了,以为是python3链接有问题,试了好几个办法,都没解决问题,

➜  ~ 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/python3.6’, but expected is ‘python2.7’ or '/usr/bin/python2.7’

➜  ~ sudo ln -sf /usr/bin/python2.7 /usr/bin/python
➜  ~ update-manager -c

就可以了。

你可能感兴趣的:(linux)