Sudo способное обновление не работает!! невстреченные зависимости Python 3

Я недавно установил Python3.8, и все хорошо работало до использования различных версий Python успешно в терминале. После нескольких дней я звонил sudo apt update, который работал просто великолепно, но когда я сделал sudo apt upgrade Я получил сообщение об ошибке ниже. Я пытался сделать sudo apt --fix-broken install и подпроцесс возвратил код ошибки.
Когда я попробовал sudo apt upgrade
Вывод

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
dh-python : Depends: python3-distutils but it is not installed
python3-dev : Depends: python3-distutils (>= 3.6.7-1~) but it is not installed
python3-pip : Depends: python3-distutils but it is not installed
python3-setuptools : Depends: python3-distutils but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Когда я попробовал sudo apt --fix-broken install
Вывод

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libllvm7 libllvm8 libllvm8:i386 libpython3.7-minimal libpython3.7-stdlib
  python3.7-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-distutils python3-lib2to3
The following NEW packages will be installed:
  python3-distutils python3-lib2to3
0 upgraded, 2 newly installed, 0 to remove and 122 not upgraded.
10 not fully installed or removed.
Need to get 0 B/222 kB of archives.
After this operation, 3,143 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 201984 files and directories currently installed.)
Preparing to unpack .../python3-lib2to3_3.6.9-1~18.04_all.deb ...
Unpacking python3-lib2to3 (3.6.9-1~18.04) ...
dpkg: error processing archive /var/cache/apt/archives/python3-lib2to3_3.6.9-1~18.04_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3.8/lib2to3/Grammar.txt', which is also in package python3.8-lib2to3 3.8.0-1+bionic2
Preparing to unpack .../python3-distutils_3.6.9-1~18.04_all.deb ...
Unpacking python3-distutils (3.6.9-1~18.04) ...
dpkg: error processing archive /var/cache/apt/archives/python3-distutils_3.6.9-1~18.04_all.deb (--unpack):
trying to overwrite '/usr/lib/python3.8/distutils/README', which is also in package python3.8-distutils 3.8.0-1+bionic2
Errors were encountered while processing:
 /var/cache/apt/archives/python3-lib2to3_3.6.9-1~18.04_all.deb
 /var/cache/apt/archives/python3-distutils_3.6.9-1~18.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я также пытался сделать это sudo apt --fix-broken install python3-distutils
Вывод

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-distutils : Depends: python3-lib2to3 (>= 3.6.4) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).```

Я также попробовал sudo apt --fix-broken install python3-lib2to3
Вывод

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 dh-python : Depends: python3-distutils but it is not going to be installed
 python3-dev : Depends: python3-distutils (>= 3.6.7-1~) but it is not going to be installed
 python3-pip : Depends: python3-distutils but it is not going to be installed
 python3-setuptools : Depends: python3-distutils but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Спасибо за любую справку, которая может быть обеспечена!

Обновление

когда я пытался сделать sudo apt install aptitude

Вывод

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 aptitude : Depends: aptitude-common (= 0.8.10-6ubuntu1) but it is not going to be installed
            Depends: libcwidget3v5 but it is not going to be installed
 dh-python : Depends: python3-distutils but it is not going to be installed
 python3-dev : Depends: python3-distutils (>= 3.6.7-1~) but it is not going to be installed
 python3-pip : Depends: python3-distutils but it is not going to be installed
 python3-setuptools : Depends: python3-distutils but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
1
задан 15 April 2020 в 02:36

3 ответа

Попытайтесь использовать следующее вместо этого:

sudo apt dist-upgrade 

Так как dist-обновление также обрабатывает новые зависимости от пакета.

Это было объяснено здесь: Почему склонное использование - добирается, обновление вместо Кв. - получают dist-обновление?

0
ответ дан 25 April 2020 в 10:48

Существует много способов решить эту проблему, если Вы хотите обновить, но не может:

Путь 1

Шаг 1: откройте Software и Updates.

Шаг 2: изменение Download from к основному серверу

Шаг 3: откройте Terminal (ctlr + alt + t) затем sudo apt-get update , затем sudo apt-get upgrade

Путь 2 удаляет PPA

Шаг 1: откройте Software и Updates.

Шаг 2: перейдите к вкладке Other Software и выберите требование PPA из списка. Впоследствии нажмите на Remove для удаления его.

ИЛИ

Можно удалить его с помощью терминала: sudo apt-add-repository -r PPA_Name/ppa

Путь 3:

Считайте это

также попытайтесь использовать, это управляет, может это помогать: sudo apt clean , sudo apt autoclean , sudo apt autoremove.

Надежда, которая помогает Вам!

0
ответ дан 25 April 2020 в 10:48

Самый простой способ:

sudo apt-get install aptitude-common libcwidget3v5
sudo aptitude upgrade

ИЛИ

sudo apt-get install python3-distutils
2
ответ дан 7 December 2020 в 06:47

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

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