I got the same error and it turns out it was also due to me installing
Emacs 25 from a PPA. My solution was also the same, as outlined in
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-
upgrader/+bug/1767357/comments/4 .

To remove Emacs from the PPA and reinstall Emacs from the official
Ubuntu repos I used the `ppa-purge` program

    sudo ppa-purge kelleyk/emacs

Where I got the PPA name `kelleyk/emacs` from the
`http://ppa.launchpad.net/kelleyk/emacs/ubuntu xenial main` line in
`/etc/apt/sources.list.d/kelleyk-ubuntu-emacs-xenial.list`.

For other people the PPA might be different.

The harder part is figuring out what package is causing the problem in
the first place. After the failed upgrade you can look in

    /var/log/dist-upgrade/<date and time of failed upgrade>/apt.log

for `Broken` packages. For me various Emacs related packages were listed
many times, but so were several other packages, but I don't think the
other broken packages were from PPAs.

Looking at the comment https://bugs.launchpad.net/ubuntu/+source/ubuntu-
release-upgrader/+bug/1767357/comments/2, it seems Emacs was suggested
as the problem because it was listed in a `Foreign` line in

    /var/log/dist-upgrade/<date and time of failed upgrade>/main.log

However, for me there was a `Foreign` line in that file, but it didn't
mention the any Emacs related packages, and the packages it did mention
didn't matter to the upgrade.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1767357

Title:
  upgrade from 16.04 to 18.04 fails "Could not calculate the upgrade"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1767357/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to