3

do-release-upgrade throws this error

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-1piubui5/groovy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeController.py", line 2089, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeController.py", line 1932, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/ubuntu-release-upgrader-1piubui5/DistUpgrade/DistUpgradeController.py", line 801, 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-1piubui5/Pop.info'
3
  • Did you update your system (by running "sudo apt update" and "sudo apt upgrade) before running do-release-upgrade ?
    – Soren A
    Oct 23, 2020 at 11:45
  • Yes, I must mention that I have few pop-os repos enabled, I also did dist-upgrade and got this error "Unpacking pop-gnome-initial-setup (3.36.1~1593716052~20.04~e07a263) ...dpkg: error processing archive /var/cache/apt/archives/pop-gnome-initial" after that I followed this answer askubuntu.com/questions/148383/… and overwrote that file Oct 23, 2020 at 19:10
  • Having repositories from other distributions is never a good idea, and is not supported.
    – Soren A
    Oct 24, 2020 at 1:58

3 Answers 3

5

I had this issue too, but in my case it was looking for Ubuntu.info.

My solution is not a solution, but a workaround: pause do-release-upgrade (simply press Crlt+Z in the terminal) during it checks the exisiting repos, look in /tmp for the latest ubuntu-release-upgrader-* directory and create an empty info file there (touch /tmp/ubuntu-release-upgrader-*/Pop.info, or something like this). Finally you can un-pause the release-upgrade process with fg.

3
  • Thanks, that was clever. Oct 26, 2020 at 16:11
  • Not working at me, but I have the same problem. Help! Oct 29, 2020 at 7:46
  • this is a clever workaround but its better to remove the repos and then re-add them after the upgrade.
    – Amias
    Oct 29, 2020 at 14:34
0

You need to remove the extra repos from your apt configuration before doing the dist-upgrade, then add them after the upgrade but only after checking they are still compatible. if you don't do this its likely you upgrade will break part way through.

list the repositories enabled in your config

apt-add-repository -L

remove one

apt-add-repository -r 'https://repository.url/ubuntu'
0

Note /tmp/ubuntu-release-upgrader-* the star in krisek's comment. There may be several of these folders that need a Pop.info or ubuntu.info to be put in.

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.