当ubuntu18执行
sudo apt update
sudo apt upgrade
在upgrade的过程中会出现以下错误
122 esm-infra security updates
Need to get 309 MB/309 MB of archives.
After this operation, 122 MB of additional disk space will be used.
Err:1 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main i386 libavahi-common-data i386 0.7-3.1ubuntu1.3+esm1
401 Unauthorized [IP: 185.125.190.24 443]
Err:2 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libavahi-common-data amd64 0.7-3.1ubuntu1.3+esm1
401 Unauthorized [IP: 185.125.190.24 443]
Err:3 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libavahi-common3 amd64 0.7-3.1ubuntu1.3+esm1
401 Unauthorized [IP: 185.125.190.24 443]
Err:4 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main i386 libavahi-common3 i386 0.7-3.1ubuntu1.3+esm1
401 Unauthorized [IP: 185.125.190.24 443]
Err:5 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main i386 libavahi-client3 i386 0.7-3.1ubuntu1.3+esm1
401 Unauthorized [IP: 185.125.190.24 443]
Err:6 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security/main amd64 libavahi-client3 amd64 0.7-3.1ubuntu1.3+esm1
401 Unauthorized [IP: 185.125.190.24 443]
修改/etc/apt/sources.list.d/ubuntu-esm-infra.list
Written by ubuntu-advantage-tools
deb https://esm.ubuntu.com/infra/ubuntu bionic-infra-security main 注释掉
deb-src https://esm.ubuntu.com/infra/ubuntu xenial-infra-security main
deb https://esm.ubuntu.com/infra/ubuntu bionic-infra-updates main 注释掉
重新再upgrade即可