401 오류로 인해 Ubuntu 18.04 apt-get 업그레이드가 실패함

401 오류로 인해 Ubuntu 18.04 apt-get 업그레이드가 실패함

릴리스 업그레이드를 하고 싶지만 먼저 업그레이드를 적절하게 수행해야 합니다. 다양한 패키지를 가져올 수 없으며 실패합니다. 무료 Ubuntu Pro를 추가해도 오류가 해결되지 않습니다.

나는 18.04를 실행하고 있습니다 :

# cat /etc/issue
Ubuntu 18.04.6 LTS \n \l

do-release-upgrade는 먼저 업그레이드를 apt-get해야 한다고 불평합니다.

# do-release-upgrade 
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

철저하게 업데이트를 먼저 실행하십시오.

# apt-get update
... works ok

문제는 다음과 같습니다. 401 오류로 인해 업그레이드가 실패합니다.

# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  grub-common grub-pc grub-pc-bin grub2-common landscape-common linux-generic
  linux-headers-generic linux-image-generic
The following packages will be upgraded:
  libnghttp2-14 libpython2.7 libpython2.7-dev libpython2.7-minimal
  libpython2.7-stdlib libpython3.6 libpython3.6-dev libpython3.6-minimal
  libpython3.6-stdlib python2.7 python2.7-dev python2.7-minimal python3.6
  python3.6-dev python3.6-minimal python3.6-venv sysstat vim vim-common
  vim-runtime vim-tiny xxd
22 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 91.8 MB of archives.
After this operation, 77.8 kB disk space will be freed.
Do you want to continue? [Y/n] 
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: 91.189.91.47 443]

((deleted because otherwise the system thinks this is spam. but it's lots of 401's))

E: Failed to fetch https://esm.ubuntu.com/infra/ubuntu/pool/main/s/sysstat/sysstat_11.6.1-1ubuntu0.2+esm1_amd64.deb  401  Unauthorized [IP: 91.189.91.47 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

개인용으로 무료 Ubuntu Pro를 선택하여 오류가 사라질 수 있는지 확인했지만 그렇지 않았습니다.

# pro security-status 
1238 packages installed:
     957 packages from Ubuntu Main/Restricted repository
     269 packages from Ubuntu Universe/Multiverse repository
     12 packages no longer available for download

To get more information about the packages, run
    pro security-status --help
for a list of available options.

This machine is attached to an Ubuntu Pro subscription.

Main/Restricted packages are receiving security updates from
Ubuntu Pro with 'esm-infra' enabled until 2028.

Universe/Multiverse packages are receiving security updates from
Ubuntu Pro with 'esm-apps' enabled until 2028. You have received 9 security
updates.

답변1

나는해결 방법:

sudo pro disable esm-infra
sudo apt-get upgrade # Now it will no longer list those packages
sudo pro enable esm-infra
sudo apt-get upgrade # Now it will properly download the packages in question

답변2

오늘 esm이 적용되지 않는 서버에서 동일한 문제가 발생했습니다. /etc/apt/sources.list.d에서 esm 파일을 제거하고 업데이트 후 업그레이드했습니다.

관련 정보