1

I have an Intel NUC7I3BNK running on Ubuntu 18.04 perfectly since 7 years. Now wanted to update to 20.04 what was successful, the systems runs stable all fine. However, I wanted to go up to release 22.04 and this failed. I get the error below.

xxx@yyy:~$ sudo do-release-upgrade -d
Neue Veröffentlichungen von Ubuntu werden gesucht
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 3: invalid continuation byte
The above exception was the direct cause of the following exception:
SystemError: <class 'UnicodeDecodeError'> returned a result with an error set
The above exception was the direct cause of the following exception:
SystemError: <class 'UnicodeDecodeError'> returned a result with an error set
The above exception was the direct cause of the following exception:
SystemError: <class 'UnicodeDecodeError'> returned a result with an error set
The above exception was the direct cause of the following exception:
SystemError: <class 'UnicodeDecodeError'> returned a result with an error set
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/bin/do-release-upgrade", line 133, in <module>
    m = MetaReleaseCore(useDevelopmentRelease=options.devel_release,
  File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 100, in __init__
    cache = apt.Cache()
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 232, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: <class 'apt_pkg.Cache'> returned a result with an error set

I had the "UnicodeDecodeError" also when I was upgrading to 20.04. But the upgrade went through and everything was fine. But the one to 22.04 did not start, but failed. I went already through a lot of forum entries, but could not find anything that helped. Someone has an idea?

Thanks for the support in advance, Matthias

4
  • This is a bit of a guess, but since the messages say something about unicode, you might try LANG=C sudo do-release-upgrade -d or perhaps LANG=C.UTF-8 sudo do-release-upgrade -d Commented Mar 3 at 23:34
  • 1
    Thanks a lot! This worked! Commented Mar 4 at 17:14
  • 1
    It would be helpful to others to provide the answer and mark it as solved, I believe you can do this as yourself as @DeronJ only posted it as a comment Commented Mar 6 at 21:28
  • Good idea @uzi3k. I initially just posted it as a comment since it was just a wild guess, but I'm glad it worked. Commented Mar 7 at 3:45

1 Answer 1

1

Since the messages say something about Unicode, you can run either

LANG=C sudo do-release-upgrade -d

or perhaps

LANG=C.UTF-8 sudo do-release-upgrade -d

Also, since this sounds like a legitimate bug, consider reporting it to Canonical: https://help.ubuntu.com/community/ReportingBugs

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.