Python dist-packages 从 19.04 升级到 19.10 时出现 UnicodeDecodeError

Python dist-packages 从 19.04 升级到 19.10 时出现 UnicodeDecodeError

我尝试运行do-release-upgrade从 ubuntu 19.04 升级到 19.10。不幸的是,我收到指向 python dist-packages 的错误回溯。我按照中所述替换了 dist_info.py将 19.04 升级到 19.10 时出现问题“UnicodeDecodeError: 'utf-8' 编解码器无法解码位置 1 中的字节 0x8b: 无效的起始字节没有任何成功。我不知道如何完成升级,非常感谢任何帮助。

PS 在我的笔记本电脑上,升级过程非常顺利

谢谢

(base) ...:~$ do-release-upgrade 
Checking for a new Ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife

Get:1 Upgrade tool signature [1.554 B]                                                                                    
Get:2 Upgrade tool [1.329 kB]                                                                                             
Fetched 1.331 kB in 0s (0 B/s)                                                                                            
authenticate 'eoan.tar.gz' against 'eoan.tar.gz.gpg' 
extracting 'eoan.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://de.archive.ubuntu.com/ubuntu disco InRelease                                                                   
Hit http://de.archive.ubuntu.com/ubuntu disco-updates InRelease                                                           
Hit http://archive.canonical.com/ubuntu disco InRelease                                                                   
Hit http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu disco InRelease                                                   
Hit http://de.archive.ubuntu.com/ubuntu disco-backports InRelease                                                         
Hit http://ppa.launchpad.net/embrosyn/cinnamon/ubuntu disco InRelease                                                     
Hit https://packages.microsoft.com/repos/ms-teams stable InRelease                                                        
Hit http://security.ubuntu.com/ubuntu disco-security InRelease                                                            
Fetched 0 B in 0s (0 B/s)                                                                                                 
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
No candidate ver:  account-plugin-facebook
No candidate ver:  account-plugin-flickr
No candidate ver:  account-plugin-google
No candidate ver:  appmenu-qt5
No candidate ver:  cgmanager
No candidate ver:  conquest-common
No candidate ver:  cuda-cudart-10-1
No candidate ver:  cuda-cudart-dev-10-1
No candidate ver:  cuda-cufft-10-1
No candidate ver:  cuda-cupti-10-1
No candidate ver:  cuda-curand-10-1
No candidate ver:  cuda-cusolver-10-1
No candidate ver:  cuda-cusparse-10-1
No candidate ver:  cuda-npp-10-1
No candidate ver:  cuda-nsight-compute-10-1
No candidate ver:  cuda-nsight-systems-10-1
No candidate ver:  cuda-nvcc-10-1
No candidate ver:  cuda-nvgraph-10-1
No candidate ver:  cuda-nvjpeg-10-1
No candidate ver:  cuda-nvprof-10-1
No candidate ver:  cuda-nvrtc-10-1
No candidate ver:  cuda-nvtx-10-1
No candidate ver:  cuda-sanitizer-api-10-1
No candidate ver:  cuda-toolkit-10-1
No candidate ver:  cuda-visual-tools-10-1

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-85qno1dr/eoan", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeController.py", line 2082, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeController.py", line 1919, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeController.py", line 967, in doPostInitialUpdate
    self.tasks = self.cache.installedTasks
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeCache.py", line 809, in installedTasks
    for line in pkg._pcache._records.record.split("\n"):
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 724: invalid start byte
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/problem_report.py", line 477, in add_to_existing
    self.write(f)
  File "/usr/lib/python3/dist-packages/problem_report.py", line 430, in write
    block = f.read(1048576)
  File "/usr/lib/python3.7/codecs.py", line 322, 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-85qno1dr/eoan", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeController.py", line 2082, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeController.py", line 1919, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeController.py", line 967, in doPostInitialUpdate
    self.tasks = self.cache.installedTasks
  File "/tmp/ubuntu-release-upgrader-85qno1dr/DistUpgrade/DistUpgradeCache.py", line 809, in installedTasks
    for line in pkg._pcache._records.record.split("\n"):
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 724: invalid start byte

我的蟒蛇:

(base) ...:~$ which python
/home/.../anaconda3/bin/python
(base) ...:~$ ls -al /usr/bin/python*
lrwxrwxrwx 1 root root      18 Apr  1 11:35 /usr/bin/python -> /usr/bin/python3.7
lrwxrwxrwx 1 root root       9 Mär  4  2019 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3691008 Okt  7 19:36 /usr/bin/python2.7
lrwxrwxrwx 1 root root      33 Okt  7 19:36 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root      16 Mär  4  2019 /usr/bin/python2-config -> python2.7-config
-rwxr-xr-x 1 root root     385 Jan 30  2019 /usr/bin/python2-futurize
-rwxr-xr-x 1 root root     389 Jan 30  2019 /usr/bin/python2-pasteurize
-rwxr-xr-x 1 root root     154 Dez  4  2018 /usr/bin/python2-pbr
-rwxr-xr-x 1 root root     365 Jan 29  2019 /usr/bin/python2-qr
lrwxrwxrwx 1 root root       9 Apr  1 13:18 /usr/bin/python3 -> python3.7
-rwxr-xr-x 2 root root 4877888 Okt  7 14:56 /usr/bin/python3.7
lrwxrwxrwx 1 root root      33 Okt  7 14:56 /usr/bin/python3.7-config -> x86_64-linux-gnu-python3.7-config
-rwxr-xr-x 2 root root 4877888 Okt  7 14:56 /usr/bin/python3.7m
lrwxrwxrwx 1 root root      34 Okt  7 14:56 /usr/bin/python3.7m-config -> x86_64-linux-gnu-python3.7m-config
-rwxr-xr-x 1 root root     398 Nov 22  2018 /usr/bin/python3-jsonschema
lrwxrwxrwx 1 root root      10 Mär 26  2019 /usr/bin/python3m -> python3.7m
-rwxr-xr-x 1 root root     364 Jan 29  2019 /usr/bin/python3-qr
lrwxrwxrwx 1 root root      14 Mär  4  2019 /usr/bin/python-config -> python2-config

编辑

我无法解决这个问题,因此我通过更改 /etc/apt/sources.list(将 every disco 更改为 eoan)并执行 apt update/upgrade/full-upgrade 步骤来手动升级我的系统。除了一些设置丢失外,此方法运行良好。

相关内容