1

I am trying to upgrade Ubuntu 20.04 to 22.04 by using the command do-release-upgrade.
The command is just crashing.
How could this be fixed?

$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                                                                                                                                                      
Get:2 Upgrade tool [1’260 kB]                                                                                                                                                                             
Fetched 1’261 kB in 0s (0 B/s)                                                                                                                                                                            
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg' 
extracting 'jammy.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://archive.canonical.com/ubuntu focal InRelease                                                                                                                                                   
Hit https://linux.teamviewer.com/deb stable InRelease                                                                                                                                                     
Hit http://archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                      
Hit http://archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                                                                              
Hit http://archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                                                                            
Hit http://archive.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                             
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                 
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
nvidia-driver-535

Checking for installed snaps
  
Calculating snap size requirements
    
Updating repository information
    
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-u9ilef1o/jammy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-u9ilef1o/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-u9ilef1o/DistUpgrade/DistUpgradeController.py", line 2042, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-u9ilef1o/DistUpgrade/DistUpgradeController.py", line 1880, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/ubuntu-release-upgrader-u9ilef1o/DistUpgrade/DistUpgradeController.py", line 783, in updateSourcesList
    self.sources = SourcesList(matcherPath=self.datadir)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ubuntu-release-upgrader-u9ilef1o/Ubuntu.info'

Excerpt from the file /var/log/dist-upgrade/main.log:

2023-12-07 02:36:12,820 DEBUG Snap snap-store is installed
2023-12-07 02:36:12,820 DEBUG Snap snap-store is not tracking the release channel
2023-12-07 02:36:13,093 DEBUG Snap snapd is installed
2023-12-07 02:36:13,094 DEBUG Snap snapd is not tracking the release channel
2023-12-07 02:36:13,461 DEBUG Snap xournalpp is installed
2023-12-07 02:36:13,462 DEBUG Snap xournalpp is not tracking the release channel
2023-12-07 02:36:14,266 DEBUG MetaPkgs: 
2023-12-07 02:36:16,981 DEBUG Foreign: teamviewer
2023-12-07 02:36:16,981 DEBUG Obsolete: ansible-core brave-browser brave-keyring google-chrome-stable librewolf python3-resolvelib synology-drive zoom
2023-12-07 02:36:16,981 DEBUG updateSourcesList()
2023-12-07 02:36:17,007 ERROR not handled exception:
Traceback (most recent call last):

  File "/tmp/ubuntu-release-upgrader-_a0a4a4k/jammy", line 8, in <module>
    sys.exit(main())

  File "/tmp/ubuntu-release-upgrader-_a0a4a4k/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():

  File "/tmp/ubuntu-release-upgrader-_a0a4a4k/DistUpgrade/DistUpgradeController.py", line 2042, in run
    return self.fullUpgrade()

  File "/tmp/ubuntu-release-upgrader-_a0a4a4k/DistUpgrade/DistUpgradeController.py", line 1880, in fullUpgrade
    if not self.updateSourcesList():

  File "/tmp/ubuntu-release-upgrader-_a0a4a4k/DistUpgrade/DistUpgradeController.py", line 783, in updateSourcesList
    self.sources = SourcesList(matcherPath=self.datadir)

  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)

  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)

  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ubuntu-release-upgrader-_a0a4a4k/Ubuntu.info'

2023-12-07 02:36:17,007 DEBUG running apport_crash()

EDIT: There is enough disk space available:

$ df -h | grep -v "/snap"
Filesystem      Size  Used Avail Use% Mounted on
udev             16G     0   16G   0% /dev
tmpfs           3.2G  2.8M  3.2G   1% /run
/dev/nvme0n1p4  239G   53G  187G  22% /
tmpfs            16G  353M   16G   3% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/nvme1n1p1  954G  594G  360G  63% /local
/dev/nvme0n1p5  661G  263G  399G  40% /home
/dev/nvme0n1p2  4.7G  193M  4.2G   5% /boot
/dev/nvme0n1p1   20G   31M   20G   1% /boot/efi
tmpfs           3.2G   20K  3.2G   1% /run/user/125
tmpfs           3.2G   64K  3.2G   1% /run/user/1000

Ubuntu Version:

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Python Version:

$ python3 --version
Python 3.8.10
5
  • @user535733 I am not aware of any undisclosed problems. There is plentiful of diskspace available.
    – norinori
    Dec 8, 2023 at 9:20
  • changed python versions? namei /etc/os-release please.
    – nobody
    Dec 8, 2023 at 12:01
  • @nobody Python version is "3.8.10". I have added the info in the above description.
    – norinori
    Dec 9, 2023 at 13:14
  • Should this not be packages.ubuntu.com/focal/amd64/python3/download
    – nobody
    Dec 9, 2023 at 13:25
  • I worked around my problem by creating a new installation of 22.04 (installing over the existing partition) and "migrating" my data and all settings by hand.
    – norinori
    Dec 12, 2023 at 15:48

0

You must log in to answer this question.

Browse other questions tagged .