5

I am trying to upgrade my system from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS. I did

% sudo apt update
% sudo apt upgrade
% sudo apt autoremove
% sudo do-release-upgrade

It plows along fine for several minutes and then this happens:

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]                                                                                                   
3
  • 1
    Strange. Python2 is deprecated, but the upgrader attempts to upgrade it rather than remove it. You probably should have done a sudo apt dist-upgrade before starting the upgrade script, but now it may be too late, and you may need to do a fresh install instead.
    – vanadium
    Oct 3 at 16:06
  • I was able to eliminate some of these complaints by uninstalling python2, then sudo apt-get autoremove. I guess I need to remove each package that causes the upgrade to bomb, one by one.
    – Lewis Goss
    Oct 3 at 16:28
  • 1
    If your APT system still works, it may indeed be a succesfull approach. Still, do a sudo apt dist-upgrade before running the upgrader - this is expected.
    – vanadium
    Oct 3 at 16:48

3 Answers 3

6

The solution is to remove the troublesome packages by hand and try to re-do the upgrade. It took me several iterations of this, and even using 'aptitude' for one package that was hard to uninstall. Nevertheless, got over the hump, with only a few hours' efforts. Much easier than a fresh install.

1

For me I think it may have been because I enabled Ubuntu Pro and then disabled it. Enabling it and its esm services seems to have fixed the problem. Run pro help to get started.

0

Commenting out repositories in /etc/apt/sources.list.d/ubuntu-esm-apps.list enabled me to dist-upgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.