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'
  • Did you update your system (by running "sudo apt update" and "sudo apt upgrade) before running do-release-upgrade ? – Soren A Oct 23 '20 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 https://askubuntu.com/questions/148383/how-to-resolve-dpkg-error-processing-var-cache-apt-archives-python-apport-2-0#266912 and overwrote that file – indianmaster Oct 23 '20 at 19:10
  • Having repositories from other distributions is never a good idea, and is not supported. – Soren A Oct 24 '20 at 01:58

3 Answers3

6

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.

MarianD
  • 1,028
krisek
  • 84
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.

MarianD
  • 1,028
tonyvx
  • 1
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'
Amias
  • 5,246