由于启动板中的 Bug#1611470,Ubuntu 14.04.5->16.04 升级失败。
我启动do-release-upgrade
它失败,因为错误#1611470。该错误已修复,但修复后的版本升级程序在 trusty 中不可用。如何将更正向后移植到 trusty?
2016年更新。10月15日:应用Stephen推荐的补丁后出现同样的错误。这是引用:
Traceback (most recent call last): File "/tmp/ubuntu-release-upgrader-4_bu5g66/xenial", line 8, in <module> File "/tmp/ubuntu-release-upgrader-4_bu5g66/DistUpgrade/DistUpgradeMain.py", line 242, in main File "/tmp/ubuntu-release-upgrader-4_bu5g66/DistUpgrade/DistUpgradeController.py", line 1876, in run File "/tmp/ubuntu-release-upgrader-4_bu5g66/DistUpgrade/DistUpgradeController.py", line 1841, in fullUpgrade File "/tmp/ubuntu-release-upgrader-4_bu5g66/DistUpgrade/DistUpgradeController.py", line 1257, in doDistUpgrade UnboundLocalError: local variable 'e' referenced before assignment Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/tmp/ubuntu-release-upgrader-4_bu5g66/DistUpgrade/DistUpgradeController.py", line 1062, in _enableAptCronJob PermissionError: [Errno 1] Operation not permitted: '/etc/cron.daily/apt'
答案1
以下应该有效...
- 下载
DistUpgradeController.diff
某处(例如,~/Downloads
) 从同一目录,尝试将补丁应用到受影响文件的副本:
cp /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py . patch -p1 < DistUpgradeController.diff
如果这不会产生任何错误,请将修复的文件复制到位(首先进行备份):
sudo cp /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py{,.bak} sudo cp DistUpgradeController.py /usr/lib/python3/dist-packages/DistUpgrade/
如果这一切都成功,您将应用修复程序#1611470。