我正在尝试将系统从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 LTS。我做到了
% sudo apt update
% sudo apt upgrade
% sudo apt autoremove
% sudo do-release-upgrade
它顺利地运行了几分钟,然后发生了这样的事情:
Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.
Continue [yN] Details [d]y
Fetching
Err https://esm.ubuntu.com/apps/ubuntu jammy-apps-security/main amd64 python2.7-dev amd64 2.7.18-13ubuntu1.1+esm2
401 Unauthorized [IP: 2001:67c:1562::21 443]
Err https://esm.ubuntu.com/apps/ubuntu jammy-apps-security/main amd64 python2.7 amd64 2.7.18-13ubuntu1.1+esm2
401 Unauthorized [IP: 2001:67c:1562::21 443]
Err https://esm.ubuntu.com/apps/ubuntu jammy-apps-security/main amd64 libpython2.7-dev amd64 2.7.18-13ubuntu1.1+esm2
401 Unauthorized [IP: 2001:67c:1562::21 443]
答案1
解决方案是手动删除有问题的软件包,然后尝试重新进行升级。我反复尝试了几次,甚至对一个难以卸载的软件包使用了“aptitude”。尽管如此,只花了几个小时就克服了困难。比全新安装容易多了。
答案2
对我来说,我认为这可能是因为我启用了 Ubuntu Pro 然后又禁用了它。启用它及其 esm 服务似乎已经解决了问题。运行pro help
以开始。
答案3
注释掉存储库使/etc/apt/sources.list.d/ubuntu-esm-apps.list
我能够dist-upgrade
。