Я не могу перейти на Ubuntu 20.04 с 18.04. Когда я запускаю sudo update-manager -d
, он показывает ошибку. Я вижу эту ошибку после прерванного обновления Ubuntu .
sh@sh-Lff:~$ update-manager -d
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 239, in _on_finished
trans_failed=trans_failed)
File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 319, in _action_done
self.window_main.duplicate_packages = self.get_deb2snap_dups()
File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 125, in get_deb2snap_dups
if (deb in cache and cache[deb].is_installed):
File "/usr/lib/python3/dist-packages/apt/cache.py", line 350, in __contains__
return self.__is_real_pkg(self._cache[key])
TypeError: Expected a string or a pair of strings
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 246, in _on_finished
error_string=error_string, error_desc=error_desc)
File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 319, in _action_done
self.window_main.duplicate_packages = self.get_deb2snap_dups()
File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 125, in get_deb2snap_dups
if (deb in cache and cache[deb].is_installed):
File "/usr/lib/python3/dist-packages/apt/cache.py", line 350, in __contains__
return self.__is_real_pkg(self._cache[key])
TypeError: Expected a string or a pair of strings
Следующие шаги:
sudo apt-get update
sudo apt-get upgrade
sudo update-manager -d
После выполнения команд мой процесс обновления был нормальным, но моя батарея разрядилась и система отключилась, я снова выполнил описанные выше шаги и увидел проблему
Я обновил версию по умолчанию, используя команду ниже :
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 20
После обновления, когда я проверяю версию Python с помощью python --version
, я вижу Python 2.7.17
.