从 18.04 升级到 20.04 因 Python 问题而失败

从 18.04 升级到 20.04 因 Python 问题而失败

当我运行 sudo do-release-upgrade 时,它​​会中止:

Could not calculate the upgrade 

An unresolvable problem occurred while calculating the upgrade. 

If none of this applies, then please report this bug using the 
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If 
you want to investigate this yourself the log files in 
'/var/log/dist-upgrade' will contain details about the upgrade. 
Specifically, look at 'main.log' and 'apt.log'. 

当我查看 main.log 时,我看到以下内容,这可能表明我在使用 python 时遇到了以中止结尾的问题。

2021-05-11 19:24:02,331 INFO checking for python-dbg (auto_inst=False)
2021-05-11 19:24:02,331 INFO checking for python-doc (auto_inst=False)
2021-05-11 19:24:02,331 INFO checking for python-minimal (auto_inst=False)
2021-05-11 19:24:02,331 INFO installing python-is-python2 because python-minimal was installed
2021-05-11 19:24:02,331 DEBUG Installing 'python-is-python2' (python-minimal was installed on the system)
2021-05-11 19:24:02,378 INFO removing python-minimal because python-is-python2 is being installed
2021-05-11 19:24:02,378 DEBUG Removing 'python-minimal' (python-is-python2 is being installed on the system)
2021-05-11 19:24:02,420 INFO failed to remove python-minimal
2021-05-11 19:24:02,420 INFO checking for python-dev (auto_inst=False)
2021-05-11 19:24:02,420 INFO installing python-dev-is-python2 because python-dev was installed
2021-05-11 19:24:02,420 DEBUG Installing 'python-dev-is-python2' (python-dev was installed on the system)
2021-05-11 19:24:02,461 INFO removing python-dev because python-dev-is-python2 is being installed
2021-05-11 19:24:02,462 DEBUG Removing 'python-dev' (python-dev-is-python2 is being installed on the system)
2021-05-11 19:24:02,503 INFO failed to remove python-dev
2021-05-11 19:24:02,503 INFO checking for libpython-dev (auto_inst=False)
2021-05-11 19:24:02,503 INFO removing libpython-dev because None is being installed
2021-05-11 19:24:02,503 DEBUG Removing 'libpython-dev' (None is being installed on the system)
2021-05-11 19:24:02,544 INFO failed to remove libpython-dev
2021-05-11 19:24:02,544 INFO checking for libpython-stdlib (auto_inst=False)
2021-05-11 19:24:02,544 INFO removing libpython-stdlib because None is being installed
2021-05-11 19:24:02,545 DEBUG Removing 'libpython-stdlib' (None is being installed on the system)
2021-05-11 19:24:02,586 INFO failed to remove libpython-stdlib
2021-05-11 19:24:02,586 INFO checking for libpython-dbg (auto_inst=False)
2021-05-11 19:24:02,586 INFO checking for python-dbg (auto_inst=True)
2021-05-11 19:24:02,586 INFO checking for python-doc (auto_inst=True)
2021-05-11 19:24:02,586 INFO checking for python-minimal (auto_inst=True)
2021-05-11 19:24:02,586 INFO installing python-is-python2 because python-minimal was installed
2021-05-11 19:24:02,586 DEBUG Installing 'python-is-python2' (python-minimal was installed on the system)
2021-05-11 19:24:02,629 INFO removing python-minimal because python-is-python2 is being installed
2021-05-11 19:24:02,629 DEBUG Removing 'python-minimal' (python-is-python2 is being installed on the system)
2021-05-11 19:24:02,629 INFO failed to remove python-minimal
2021-05-11 19:24:02,629 INFO checking for python-dev (auto_inst=True)
2021-05-11 19:24:02,630 INFO installing python-dev-is-python2 because python-dev was installed
2021-05-11 19:24:02,630 DEBUG Installing 'python-dev-is-python2' (python-dev was installed on the system)
2021-05-11 19:24:02,671 INFO removing python-dev because python-dev-is-python2 is being installed
2021-05-11 19:24:02,671 DEBUG Removing 'python-dev' (python-dev-is-python2 is being installed on the system)
2021-05-11 19:24:02,671 INFO failed to remove python-dev
2021-05-11 19:24:02,671 INFO checking for libpython-dev (auto_inst=True)
2021-05-11 19:24:02,671 INFO removing libpython-dev because None is being installed
2021-05-11 19:24:02,671 DEBUG Removing 'libpython-dev' (None is being installed on the system)
2021-05-11 19:24:02,671 INFO failed to remove libpython-dev
2021-05-11 19:24:02,671 INFO checking for libpython-stdlib (auto_inst=True)
2021-05-11 19:24:02,671 INFO removing libpython-stdlib because None is being installed
2021-05-11 19:24:02,671 DEBUG Removing 'libpython-stdlib' (None is being installed on the system)
2021-05-11 19:24:02,671 INFO failed to remove libpython-stdlib
2021-05-11 19:24:02,672 INFO checking for libpython-dbg (auto_inst=True)
2021-05-11 19:24:03,298 ERROR Dist-upgrade failed: '**E:Error**, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'
2021-05-11 19:24:03,298 **DEBUG abort called**

注意:我曾经sudo dpkg -l | grep ^h检查过被扣留的包裹,但是没有。

在此之前我运行没有错误。

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove

我需要安装 python 吗?如果需要,我应该使用什么包名?欢迎提出任何建议。

相关内容