我正在尝试从 Ubuntu 18.04 更新到 20.04,但是当我运行时do-release-update
,出现错误:
su@sudo:~$ do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]
Get:2 Upgrade tool [1,342 kB]
Fetched 1,343 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'
Reading cache
Checking package manager
Can not upgrade
Your python3 install is corrupted. Please fix the '/usr/bin/python3'
symlink.
ls -al /usr/bin|grep python3
lrwxrwxrwx 1 root root 29 Mar 27 2018 dh_python3 -> ../share/dh-python/dh_python3
lrwxrwxrwx 1 root root 23 Apr 18 07:26 pdb3.6 -> ../lib/python3.6/pdb.py
lrwxrwxrwx 1 root root 23 Nov 7 2019 pdb3.7 -> ../lib/python3.7/pdb.py
lrwxrwxrwx 1 root root 31 Oct 25 2018 py3versions -> ../share/python3/py3versions.py
lrwxrwxrwx 1 root root 19 Jun 10 15:12 python3 -> /usr/bin/python3.6m
lrwxrwxrwx 1 root root 16 Jun 10 14:36 python3.6 -> /usr/bin/python3
lrwxrwxrwx 1 root root 33 Apr 18 07:26 python3.6-config -> x86_64-linux-gnu-python3.6-config
-rwxr-xr-x 1 root root 4526456 Apr 18 07:26 python3.6m
lrwxrwxrwx 1 root root 34 Apr 18 07:26 python3.6m-config -> x86_64-linux-gnu-python3.6m-config
-rwxr-xr-x 2 root root 4873376 Nov 7 2019 python3.7
-rwxr-xr-x 2 root root 4873376 Nov 7 2019 python3.7m
lrwxrwxrwx 1 root root 16 Oct 25 2018 python3-config -> python3.6-config
lrwxrwxrwx 1 root root 10 Oct 25 2018 python3m -> python3.6m
lrwxrwxrwx 1 root root 17 Oct 25 2018 python3m-config -> python3.6m-config
lrwxrwxrwx 1 root root 34 Apr 18 07:26 x86_64-linux-gnu-python3.6-config -> x86_64-linux-gnu-python3.6m-config
-rwxr-xr-x 1 root root 3283 Apr 18 07:26 x86_64-linux-gnu-python3.6m-config
lrwxrwxrwx 1 root root 33 Oct 25 2018 x86_64-linux-gnu-python3-config -> x86_64-linux-gnu-python3.6-config
lrwxrwxrwx 1 root root 34 Oct 25 2018 x86_64-linux-gnu-python3m-config -> x86_64-linux-gnu-python3.6m-config
$ dpkg -l | egrep -v'^ii|rc'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-=============================================-===================================================-============-=================================================================================
rFR python3 3.6.7-1~18.04 amd64 interactive high-level object-oriented language (default python3 version)
答案1
sudo apt install --reinstall python3
包裹处于不洁净状态
rFR python3
下一步是升级到 Ubuntu 20.04。确保在文件中
/etc/update-manager/release-upgrades
Prompt=lts
已设置。请备份您的数据并重试。