4

So I've been trying to update to Ubuntu 22.04 development release but certain errors are coming. Whenever I try to update the following error comes ->

abc@ubuntu:~$ update-manager -d 
Checking for a new Ubuntu release
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg' 
extracting 'jammy.tar.gz'
No candidate ver:  chromium
No candidate ver:  microsoft-edge-stable
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-6ylluso8/jammy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeController.py", line 2038, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeController.py", line 1881, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeController.py", line 784, 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-6ylluso8/Ubuntu.info'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/problem_report.py", line 477, in add_to_existing
    self.write(f)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 430, in write
    block = f.read(1048576)
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Original exception was: Traceback (most recent call last): File "/tmp/ubuntu-release-upgrader-6ylluso8/jammy", line 8, in <module> sys.exit(main()) File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeMain.py", line 241, in main if app.run(): File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeController.py", line 2038, in run return self.fullUpgrade() File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeController.py", line 1881, in fullUpgrade if not self.updateSourcesList(): File "/tmp/ubuntu-release-upgrader-6ylluso8/DistUpgrade/DistUpgradeController.py", line 784, 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-6ylluso8/Ubuntu.info'

Is there any solution to this? I guess a file named Ubuntu.info is missing.

EDIT: I was asked to disable 3rd party repos by @vanadium, but the results remained unchanged.

abc@ubuntu:~$ sudo do-release-upgrade -d
Checking for a new Ubuntu release
Checking for a new Ubuntu release
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg' 
extracting 'jammy.tar.gz'
No candidate ver:  chromium
No candidate ver:  microsoft-edge-stable
No candidate ver:  pipewire-audio-client-libraries
No candidate ver:  pipewire-bin
No candidate ver:  pipewire-media-session
No candidate ver:  pipewire-pulse
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-son1yxme/jammy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeController.py", line 2038, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeController.py", line 1881, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeController.py", line 784, 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-son1yxme/Ubuntu.info'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/problem_report.py", line 477, in add_to_existing
    self.write(f)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 430, in write
    block = f.read(1048576)
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Original exception was: Traceback (most recent call last): File "/tmp/ubuntu-release-upgrader-son1yxme/jammy", line 8, in <module> sys.exit(main()) File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeMain.py", line 241, in main if app.run(): File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeController.py", line 2038, in run return self.fullUpgrade() File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeController.py", line 1881, in fullUpgrade if not self.updateSourcesList(): File "/tmp/ubuntu-release-upgrader-son1yxme/DistUpgrade/DistUpgradeController.py", line 784, 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-son1yxme/Ubuntu.info'

2 Answers2

3

Just ran into this while doing a do-release-upgrade manually. The gui was failing before this. The workaround answer from here by MarianD is what solved it for me. You need to create the Ubuntu.info file in the /tmp/ubuntu-release-upgrader-*/ folder using touch.

for example: touch /tmp/ubuntu-release-upgrader-93aizvle/Ubuntu.info

This can be tricky since it makes a new folder every time you run do-distribution-upgrade and it can fail before you have a chance to type in the touch command for the newly created folder. Exciting! Took me 4 tries. Remember to capitalize the 'U'.

I have a strong feeling adding a PopOS repo to my system is to blame. I did it to get a non-snap version of Chromium but all hell broke loose as a result. I tried to undo the damage but two years later I still run across some scars. I see a reference to Pop.info in many of the answers to this problem.

Rishon_JR
  • 1,013
2

Just was surfing through internet and found the solution to this problem, and my Ubuntu 20.04 was successfully upgraded to 22.04. The solution can be found here.

Instead of a file called “Pop.info”(as given in the answer) make a file called “Ubuntu.info”

  • 1
    This is awfully close to a link-only answer. Can you (without stepping on anyone's IP) include some additional details of the fix? – Zeiss Ikon Apr 25 '22 at 19:06
  • You have 'pop.info' because you're on PopOS. PopOS is NOT Ubuntu and not supported here. (Closed as offtopic) – Thomas Ward Apr 25 '22 at 20:18
  • @ZeissIkon I mean i guess there is nothing much more to it, just a file named ubuntu.info was missing from the folder which I added during the update process – Krrish Dhaneja Apr 26 '22 at 02:10
  • @ThomasWard The answer he found was for PopOS, but Krrish has Ubuntu. He's just trying to make an unsupported upgrade. – Zeiss Ikon Apr 26 '22 at 11:08
  • Pop OS just annoying installed itself with a complete BS "Partial Upgrade" suggestions. Following the above two answers managed to at least upgrade me to the newest Ubuntu version - but with much frustration and gnashing of teeth to get things to how they were before this unwanted jig down the upgrade paths. – Fluffeh Jul 31 '23 at 09:41