尝试从 18.04 升级。尝试更新 && 升级时,我收到 401 未授权错误。我没有 UA,也从未有过。即使没有启用 UA,它似乎也在尝试从 ESM 中提取。由于它收到 401,因此无法更新软件包,因此我无法发布升级。由于这是一个新帐户,我不能发布太多 URL。假设 [ESMURL] =https://esm.ubuntu.com/infra/ubuntu
$ cat /etc/issue
Ubuntu 18.04.6 LTS \n \l
sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
sudo apt update && sudo apt upgrade -y
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/tj/bugfixes/ubuntu bionic InRelease
Hit:5 [ESMURL] bionic-infra-security InRelease
Hit:6 [ESMURL] bionic-infra-updates InRelease
Hit:7 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
67 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
augeas-lenses libaugeas0 python-asn1crypto python-attr python-automat python-cffi-backend python-click python-colorama python-configobj python-constantly python-cryptography python-enum34 python-gdbm
python-hyperlink python-idna python-incremental python-ipaddress python-openssl python-pam python-pkg-resources python-pyasn1 python-pyasn1-modules python-pycurl python-serial python-service-identity
python-six python-twisted-bin python-twisted-core python-twisted-web python-zope.interface python3-augeas python3-configargparse python3-future python3-ndg-httpsclient python3-parsedatetime
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
efibootmgr libefiboot1 libefivar1
The following packages will be upgraded:
apt-transport-https command-not-found command-not-found-data distro-info-data grub-common grub-pc grub-pc-bin grub2-common iptables klibc-utils landscape-client landscape-common libapt-inst2.0 libc-bin
libc6 libcap2 libcap2-bin libip4tc0 libip6tc0 libiptc0 libkeyutils1 libklibc liblxc-common liblxc1 libnghttp2-14 libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3.6 libpython3.6-minimal
libpython3.6-stdlib libsensors4 libunwind8 libx11-6 libx11-data libxtables12 linux-firmware locales lxcfs lxd lxd-client multiarch-support open-iscsi open-vm-tools openssh-client openssh-server
openssh-sftp-server python-apt python-apt-common python2.7 python2.7-minimal python3-apt python3-commandnotfound python3-requests python3-software-properties python3.6 python3.6-minimal
software-properties-common sosreport tcpdump ubuntu-advantage-tools update-notifier-common vim vim-common vim-runtime vim-tiny xxd
67 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.4 MB/118 MB of archives.
After this operation, 761 kB disk space will be freed.
Err:1 [ESMURL] bionic-infra-security/main amd64 libpython2.7 amd64 2.7.17-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:2 [ESMURL] bionic-infra-security/main amd64 python2.7 amd64 2.7.17-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:3 [ESMURL] bionic-infra-security/main amd64 libpython2.7-stdlib amd64 2.7.17-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:4 [ESMURL] bionic-infra-security/main amd64 python2.7-minimal amd64
2.7.17-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:5 [ESMURL] bionic-infra-security/main amd64 libpython2.7-minimal amd64 2.7.17-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:6 [ESMURL] bionic-infra-security/main amd64 libpython3.6 amd64
3.6.9-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:7 [ESMURL] bionic-infra-security/main amd64 python3.6 amd64 3.6.9-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:8 [ESMURL] bionic-infra-security/main amd64 libpython3.6-stdlib amd64 3.6.9-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:9 [ESMURL] bionic-infra-security/main amd64 python3.6-minimal amd64
3.6.9-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:10 [ESMURL] bionic-infra-security/main amd64 libpython3.6-minimal amd64 3.6.9-1~18.04ubuntu1.13
401 Unauthorized [IP: 91.189.91.46 443]
Err:11 [ESMURL] bionic-infra-security/main amd64 libcap2 amd64 1:2.25-1.2ubuntu0.1~esm1
401 Unauthorized [IP: 91.189.91.46 443]
Err:12 [ESMURL] bionic-infra-security/main amd64 libcap2-bin amd64 1:2.25-1.2ubuntu0.1~esm1
401 Unauthorized [IP: 91.189.91.46 443]
Err:13 [ESMURL] bionic-infra-security/main amd64 vim amd64 2:8.0.1453-1ubuntu1.13+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Err:14 [ESMURL] bionic-infra-security/main amd64 vim-tiny amd64 2:8.0.1453-1ubuntu1.13+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Ign:15 [ESMURL] bionic-infra-security/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.13+esm1
Err:16 [ESMURL] bionic-infra-security/main amd64 xxd amd64 2:8.0.1453-1ubuntu1.13+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Ign:17 [ESMURL] bionic-infra-security/main amd64 vim-common all 2:8.0.1453-1ubuntu1.13+esm1
Err:18 [ESMURL] bionic-infra-security/main amd64 libnghttp2-14 amd64
1.30.0-1ubuntu1+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Ign:19 [ESMURL] bionic-infra-security/main amd64 libx11-data all 2:1.6.4-3ubuntu0.4+esm1
Err:20 [ESMURL] bionic-infra-security/main amd64 libx11-6 amd64 2:1.6.4-3ubuntu0.4+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Ign:21 [ESMURL] bionic-infra-security/main amd64 python3-requests all 2.18.4-2ubuntu0.1+esm1
Err:15 [ESMURL] bionic-infra-security/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.13+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Err:17 [ESMURL] bionic-infra-security/main amd64 vim-common all 2:8.0.1453-1ubuntu1.13+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Err:19 [ESMURL] bionic-infra-security/main amd64 libx11-data all 2:1.6.4-3ubuntu0.4+esm1
401 Unauthorized [IP: 91.189.91.46 443]
Err:21 [ESMURL] bionic-infra-security/main amd64 python3-requests all 2.18.4-2ubuntu0.1+esm1
401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python2.7/libpython2.7_2.7.17-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python2.7/python2.7_2.7.17-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python2.7/libpython2.7-stdlib_2.7.17-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python2.7/python2.7-minimal_2.7.17-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python2.7/libpython2.7-minimal_2.7.17-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python3.6/libpython3.6_3.6.9-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python3.6/python3.6_3.6.9-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python3.6/libpython3.6-stdlib_3.6.9-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python3.6/python3.6-minimal_3.6.9-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/p/python3.6/libpython3.6-minimal_3.6.9-1~18.04ubuntu1.13_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/libc/libcap2/libcap2_2.25-1.2ubuntu0.1~esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/libc/libcap2/libcap2-bin_2.25-1.2ubuntu0.1~esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/v/vim/vim_8.0.1453-1ubuntu1.13+esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/v/vim/vim-tiny_8.0.1453-1ubuntu1.13+esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/v/vim/vim-runtime_8.0.1453-1ubuntu1.13+esm1_all.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/v/vim/xxd_8.0.1453-1ubuntu1.13+esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/v/vim/vim-common_8.0.1453-1ubuntu1.13+esm1_all.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/n/nghttp2/libnghttp2-14_1.30.0-1ubuntu1+esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/libx/libx11/libx11-data_1.6.4-3ubuntu0.4+esm1_all.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/libx/libx11/libx11-6_1.6.4-3ubuntu0.4+esm1_amd64.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Failed to fetch [ESMURL]/pool/main/r/requests/python3-requests_2.18.4-2ubuntu0.1+esm1_all.deb 401 Unauthorized [IP: 91.189.91.46 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ua status
SERVICE AVAILABLE DESCRIPTION
cc-eal yes Common Criteria EAL2 Provisioning Packages
cis yes Security compliance and audit tools
esm-infra yes UA Infra: Extended Security Maintenance (ESM)
fips yes NIST-certified core packages
fips-updates yes NIST-certified core packages with priority security updates
livepatch yes Canonical Livepatch service
This machine is not attached to a UA subscription.
See https://ubuntu.com/advantage
答案1
[ESMURL] 并未硬编码到 apt 中,因此请检查您的 apt 源。
- /etc/apt/sources.list(文件)
- /etc/apt/sources.list.d/(目录)
它就在某处。删除它,然后重试。