Ubuntu 18.04版本升级问题

Ubuntu 18.04版本升级问题

阅读后这个问题及其答案,我注册了一个 Ubuntu Pro 帐户并使用连接我的机器sudo pro attach TOKEN

然后我运行sudo apt update,然后sudo apt upgrade继续得到所有 Python 包的以下未经授权的错误。仍然收到以下错误消息:

Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
  libnghttp2-14 libpython2.7 libpython2.7-dev libpython2.7-minimal
  libpython2.7-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib
  python2.7 python2.7-dev python2.7-minimal python3.6 python3.6-minimal
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
13 esm-infra security updates
Need to get 38.9 MB of archives.
After this operation, 79.9 kB disk space will be freed.
Err:1 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 python2.7-dev amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:2 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython2.7-dev amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:3 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython2.7 amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:4 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 python2.7 amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:5 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython2.7-stdlib amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:6 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 python2.7-minimal amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:7 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython2.7-minimal amd64 2.7.17-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:8 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython3.6 amd64 3.6.9-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:9 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 python3.6 amd64 3.6.9-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:10 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython3.6-stdlib amd64 3.6.9-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:11 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 python3.6-minimal amd64 3.6.9-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:12 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libpython3.6-minimal amd64 3.6.9-1~18.04ubuntu1.13
  401  Unauthorized [IP: 185.125.190.24 443]
Err:13 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libnghttp2-14 amd64 1.30.0-1ubuntu1+esm1
  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/python2.7-dev_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/libpython2.7-dev_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/libpython2.7_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/python2.7_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/libpython2.7-stdlib_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/python2.7-minimal_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python2.7/libpython2.7-minimal_2.7.17-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python3.6/libpython3.6_3.6.9-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python3.6/python3.6_3.6.9-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python3.6/libpython3.6-stdlib_3.6.9-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python3.6/python3.6-minimal_3.6.9-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/p/python3.6/libpython3.6-minimal_3.6.9-1~18.04ubuntu1.13_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/n/nghttp2/libnghttp2-14_1.30.0-1ubuntu1+esm1_amd64.deb  401  Unauthorized [IP: 185.125.190.24 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我知道 18.04 已达到生命周期 (EoL),但这是一款较旧的桌面,不会定期使用或升级,因此它就这样溜走了。

关于如何解决此问题以便我可以升级到最新的 LTS 版本有什么想法吗?

答案1

我在阅读时发现了一个解决方法https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1990798

pro disable esm-infra

运行apt-get upgrade并看到它不再列出那些包。

pro enable esm-infra

ran apt-get upgrade,现在它将下载有问题的包。

答案2

在使用 附加令牌后sudo pro attach,您可能需要先禁用 esm:

sudo pro disable esm-apps esm-infra

然后

sudo apt update && sudo apt upgrade

如果没有收到 401 错误,则启用 esm:

sudo pro enable esm-apps esm-infra

然后

sudo apt update && sudo apt upgrade

这对我的 18.04 有效。

相关内容