Question

Upgrading from 16.04.7 LTS Ubuntu Server

Posted November 23, 2020 517 views
Ubuntu 16.04

When I run an update I get this error:

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ubuntu@ip-172-31-72-89:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,242 kB]
Fetched 1,243 kB in 0s (0 B/s)
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg'
extracting 'bionic.tar.gz'
Investigating (4) landscape-common [ amd64 ] < none -> 18.01-0ubuntu3.5 > ( admin )
Broken landscape-common:amd64 Depends on python3-twisted [ amd64 ] < none -> 17.9.0-2ubuntu0.1 > ( python )
  Considering python3-twisted:amd64 1 as a solution to landscape-common:amd64 9999
    Reinst Failed because of python3-zope.interface:amd64
  MarkKeep python3-twisted [ amd64 ] < none -> 17.9.0-2ubuntu0.1 > ( python ) FU=0
  Considering python3-twisted:amd64 1 as a solution to landscape-common:amd64 9999
Done

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/bionic", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 2072, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 1981, in fullUpgrade
    if not self.askDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 1153, in askDistUpgrade
    changes = self.calcDistUpgrade()
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 1120, in calcDistUpgrade
    if not self.cache.installTasks(self.tasks):
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeCache.py", line 856, in installTasks
    pkg.mark_install()
  File "/usr/lib/python3/dist-packages/apt/package.py", line 1356, in mark_install
    fixer.resolve(True)
SystemError: E:Unable to correct problems, you have held broken packages.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/problem_report.py", line 497, in add_to_existing
    self.write(f)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 450, in write
    block = f.read(1048576)
  File "/usr/lib/python3.5/codecs.py", line 321, 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-e4ydbqh7/bionic", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 2072, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 1981, in fullUpgrade
    if not self.askDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 1153, in askDistUpgrade
    changes = self.calcDistUpgrade()
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeController.py", line 1120, in calcDistUpgrade
    if not self.cache.installTasks(self.tasks):
  File "/tmp/ubuntu-release-upgrader-e4ydbqh7/DistUpgrade/DistUpgradeCache.py", line 856, in installTasks
    pkg.mark_install()
  File "/usr/lib/python3/dist-packages/apt/package.py", line 1356, in mark_install
    fixer.resolve(True)
SystemError: E:Unable to correct problems, you have held broken packages.
=== Command detached from window (Sat Nov  7 03:36:58 2020) ===

After doing some research I think it may be beacuse of certbot python maybe… ut really have no idea what to try next.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi @mikejones3,

It does seem like it’s a dependency problem. Those dependencies can either be removed and installed from the proper repository or just remove the whole python3 package. Do the upgrade of your system and then re-add it.

Having said that, I’ll strongly recommend upgrading to Ubuntu 20.04 as 16.04 is considered End of Life for some time now. As for the upgrade process from 16.04 to 20.04, I’ll recommend just creating a new droplet and migrating your stuff there, it has less probability to break something that way!

Regards,
KFSys

Uninstalling certbot solved for me because it affected python3 modules.