我正在尝试从 18.04 升级到 20.04,但每次升级都失败。这似乎是 Python 的问题,但我不知道如何修复它。
这是 apt.log 文件。
Log time: 2022-04-11 20:04:47.017579
Log time: 2022-04-11 20:05:08.103748
MarkDelete python-minimal:amd64 < 2.7.15~rc1-1 @ii mK > FU=1
MarkDelete python-dev:amd64 < 2.7.15~rc1-1 @ii mK > FU=1
MarkDelete libpython-dev:amd64 < 2.7.15~rc1-1 @ii mK > FU=1
MarkDelete libpython-stdlib:amd64 < 2.7.15~rc1-1 @ii mK > FU=1
MarkInstall python-is-python2:amd64 < none -> 2.7.17-4 @un umN Ib > FU=1
Installing python2 as Depends of python-is-python2
MarkInstall python2:amd64 < none -> 2.7.17-2ubuntu4 @un uN Ib > FU=0
Installing python2-minimal as PreDepends of python2
MarkInstall python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un uN > FU=0
Installing libpython2-stdlib as Depends of python2
MarkInstall libpython2-stdlib:amd64 < none -> 2.7.17-2ubuntu4 @un uN > FU=0
Removing: python
MarkDelete python:amd64 < 2.7.15~rc1-1 @ii mK Ib > FU=0
MarkInstall python-dev-is-python2:amd64 < none -> 2.7.17-4 @un umN Ib > FU=1
Installing python2-dev as Depends of python-dev-is-python2
MarkInstall python2-dev:amd64 < none -> 2.7.17-2ubuntu4 @un uN Ib > FU=0
Installing libpython2-dev as Depends of python2-dev
MarkInstall libpython2-dev:amd64 < none -> 2.7.17-2ubuntu4 @un uN > FU=0
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) python-support:amd64 < 1.0.15 @ii mK Ib >
Broken python-support:amd64 Depends on python-minimal:amd64 < 2.7.15~rc1-1 @ii gR >
Considering python-minimal:amd64 1 as a solution to python-support:amd64 5
Added python-minimal:amd64 to the remove list
Fixing python-support:amd64 via keep of python-minimal:amd64
MarkKeep python-minimal:amd64 < 2.7.15~rc1-1 @ii gR > FU=0
Investigating (0) python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2-minimal:amd64 Breaks on python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > (< 2.7.15-2)
Considering python-minimal:amd64 1 as a solution to python2-minimal:amd64 4
Added python-minimal:amd64 to the remove list
Fixing python2-minimal:amd64 via remove of python-minimal:amd64
MarkDelete python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > FU=0
Investigating (1) python-support:amd64 < 1.0.15 @ii mK Ib >
Broken python-support:amd64 Depends on python-minimal:amd64 < 2.7.15~rc1-1 @ii gR >
Considering python-minimal:amd64 1 as a solution to python-support:amd64 5
Added python-minimal:amd64 to the remove list
Fixing python-support:amd64 via keep of python-minimal:amd64
MarkKeep python-minimal:amd64 < 2.7.15~rc1-1 @ii gR > FU=0
Investigating (1) python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2-minimal:amd64 Breaks on python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > (< 2.7.15-2)
Considering python-minimal:amd64 1 as a solution to python2-minimal:amd64 4
Added python-minimal:amd64 to the remove list
Fixing python2-minimal:amd64 via remove of python-minimal:amd64
MarkDelete python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > FU=0
Investigating (2) python-support:amd64 < 1.0.15 @ii mK Ib >
Broken python-support:amd64 Depends on python-minimal:amd64 < 2.7.15~rc1-1 @ii gR >
Considering python-minimal:amd64 1 as a solution to python-support:amd64 5
Added python-minimal:amd64 to the remove list
Fixing python-support:amd64 via keep of python-minimal:amd64
MarkKeep python-minimal:amd64 < 2.7.15~rc1-1 @ii gR > FU=0
Investigating (2) python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2-minimal:amd64 Breaks on python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > (< 2.7.15-2)
Considering python-minimal:amd64 5 as a solution to python2-minimal:amd64 4
MarkKeep python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib > FU=0
Holding Back python2-minimal:amd64 rather than change python-minimal:amd64
Investigating (3) python2:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2:amd64 PreDepends on python2-minimal:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
Considering python2-minimal:amd64 4 as a solution to python2:amd64 7
MarkKeep python2:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib > FU=0
Holding Back python2:amd64 rather than change python2-minimal:amd64
Investigating (3) python-all:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib >
Broken python-all:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
Considering python2:amd64 7 as a solution to python-all:amd64 2
MarkKeep python-all:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib > FU=0
Re-Instated python2-minimal:amd64
Re-Instated python2:amd64
Re-Instated python-all:amd64
Investigating (4) python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2-minimal:amd64 Breaks on python-minimal:amd64 < 2.7.15~rc1-1 @ii gK > (< 2.7.15-2)
Considering python-minimal:amd64 5 as a solution to python2-minimal:amd64 4
MarkKeep python2-minimal:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib > FU=0
Holding Back python2-minimal:amd64 rather than change python-minimal:amd64
Investigating (5) python2:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2:amd64 PreDepends on python2-minimal:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
Considering python2-minimal:amd64 4 as a solution to python2:amd64 7
MarkKeep python2:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib > FU=0
Holding Back python2:amd64 rather than change python2-minimal:amd64
Investigating (5) python-all:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib >
Broken python-all:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
Considering python2:amd64 7 as a solution to python-all:amd64 2
MarkKeep python-all:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib > FU=0
Removing python-all:amd64 rather than change python2:amd64
MarkDelete python-all:amd64 < 2.7.15~rc1-1 | 2.7.17-2ubuntu4 @ii umH Ib > FU=0
Investigating (5) python2-dev:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib >
Broken python2-dev:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
Considering python2:amd64 7 as a solution to python2-dev:amd64 2
MarkKeep python2-dev:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib > FU=0
Holding Back python2-dev:amd64 rather than change python2:amd64
Investigating (5) python-all-dev:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib >
Broken python-all-dev:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH > (= 2.7.17-2ubuntu4)
Considering python2:amd64 7 as a solution to python-all-dev:amd64 1
MarkKeep python-all-dev:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib > FU=0
Reinst Failed because of python2:amd64
MarkKeep python-all-dev:amd64 < 2.7.15~rc1-1 -> 2.7.17-2ubuntu4 @ii umU Ib > FU=0
Removing python-all-dev:amd64 rather than change python2:amd64
MarkDelete python-all-dev:amd64 < 2.7.15~rc1-1 | 2.7.17-2ubuntu4 @ii umH Ib > FU=0
Investigating (6) python-is-python2:amd64 < none -> 2.7.17-4 @un pumN Ib >
Broken python-is-python2:amd64 Depends on python2:amd64 < none | 2.7.17-2ubuntu4 @un umH >
Considering python2:amd64 7 as a solution to python-is-python2:amd64 10000
Investigating (6) python-dev-is-python2:amd64 < none -> 2.7.17-4 @un pumN Ib >
Broken python-dev-is-python2:amd64 Depends on python2-dev:amd64 < none | 2.7.17-2ubuntu4 @un umH >
Considering python2-dev:amd64 2 as a solution to python-dev-is-python2:amd64 9999
Reinst Failed because of python2:amd64
MarkKeep python2-dev:amd64 < none -> 2.7.17-2ubuntu4 @un umN Ib > FU=0
Done
Log time: 2022-04-11 20:05:11.279568
当我运行 apt dist-upgrade 或 upgrade 时,我没有看到任何损坏的软件包或其他问题。我删除了 python-dev(根据在其他地方找到的建议),但没有效果。我还删除了 nodejs(同样根据在其他地方找到的建议),但没有效果。
这很像所描述的错误这里,但该线程说问题已得到解决,而我这边的情况并非如此。
任何建议,将不胜感激。
答案1
我通过以下方式解决了该问题(两次,在不同的计算机上):
sudo apt remove python-dev
然后执行do-release-upgrade
。
升级将几乎完成,但在某些时候它会因包裹损坏而停止。
然后,我手动编辑了文件,将第 81 行的/usr/share/pyzo/pyzo/yoton/clientserver.py
参数名称更改为,以及下面两三行使用该参数的位置。然后我运行和,升级正确完成。async
assync
apt --fix-broken install
apt dist-upgrade