Обновление с 19.04 до 19.10 невозможно [дубликат]

Я сделал do-release-upgrade -d и получил эту трассировку. Ранее я экспериментировал с альтернативами обновления , указывая python на python3 и указывая python3 на python3.8 но я sudo update-alternatives --remove-all python и sudo apt install --reinstall редактировал их оба.

$ sudo do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]                                                         
Get:2 Upgrade tool [1,319 kB]                                                                  
Fetched 1,320 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://ca.archive.ubuntu.com/ubuntu disco InRelease                                        
Hit http://ca.archive.ubuntu.com/ubuntu disco-updates InRelease                                
Hit http://security.ubuntu.com/ubuntu disco-security InRelease                                 
Hit http://ca.archive.ubuntu.com/ubuntu disco-backports InRelease                              
Ign http://dl.google.com/linux/chrome/deb stable InRelease                                     
Hit http://dl.google.com/linux/chrome/deb stable Release                                       
Fetched 0 B in 0s (0 B/s)                                                                      
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 802, in _prepare_snap_replacement_data
    di.version('%s' % self.controller.fromDist).split()[0]
AttributeError: 'UbuntuDistroInfo' object has no attribute 'version'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/eoan", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeController.py", line 2084, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeController.py", line 1921, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeController.py", line 927, in doPostInitialUpdate
    self.quirks.run("PostInitialUpdate")
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 97, in run
    func()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 129, in eoanPostInitialUpdate
    self._calculateSnapSizeRequirements()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 459, in _calculateSnapSizeRequirements
    self._prepare_snap_replacement_data()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 808, in _prepare_snap_replacement_data
    (r.version for r in di.get_all("object")
AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'
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-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 802, in _prepare_snap_replacement_data
    di.version('%s' % self.controller.fromDist).split()[0]
AttributeError: 'UbuntuDistroInfo' object has no attribute 'version'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/eoan", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeController.py", line 2084, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeController.py", line 1921, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeController.py", line 927, in doPostInitialUpdate
    self.quirks.run("PostInitialUpdate")
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 97, in run
    func()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 129, in eoanPostInitialUpdate
    self._calculateSnapSizeRequirements()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 459, in _calculateSnapSizeRequirements
    self._prepare_snap_replacement_data()
  File "/tmp/ubuntu-release-upgrader-ymy3ktjy/DistUpgrade/DistUpgradeQuirks.py", line 808, in _prepare_snap_replacement_data
    (r.version for r in di.get_all("object")
AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'
5
задан 21 June 2020 в 02:49

2 ответа

Согласно https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1874250/comments/9 ", как правило, это происходит из-за установленной через пакет версии distro-info затенение версии apt ", и вы можете избавиться от версии, установленной в pip, с помощью

sudo python3 -m pip uninstall distro-info 
sudo apt reinstall python3-distro-info
0
ответ дан 3 January 2021 в 23:05

У меня была такая же проблема. Я решил это, выполнив следующие действия:

  1. Откройте терминал.

  2. Введите следующие инструкции:

     wget https://salsa.debian.org/debian/distro-info/raw/master/python/distro_info.  ру
    sudo cp /usr/local/lib/python3.7/dist-packages/distro_info.py /usr/local/lib/python3.7/dist-packages/distro_info.py.old
    sudo cp distro_info.py /usr/local/lib/python3.7/dist-packages/distro_info.py
     
  3. Запустите команду:

     sudo do-release-upgrade
     
5
ответ дан 3 January 2021 в 23:05

Другие вопросы по тегам:

Похожие вопросы: