web-dev-qa-db-fra.com

Ubuntu 16.04 Python3 + dpkg + apt-get complètement cassé!

Peut-être que quelqu'un peut m'aider à traverser cet enfer:

Tout a commencé lorsque j'ai rencontré cette erreur: https://askubuntu.com/a/1034266/570817

et j'ai essayé de supprimer en quelque sorte l'installation de ppa:jonathonf/python-3.6 mais je me suis trompé en premier lieu et j'ai simplement supprimé les fichiers python3 dans /usr/bin/python3*

Ensuite, je suis allé plus loin avec la vitesse continue directement en enfer en essayant et en utilisant des indices différents sur des articles similaires, où, à partir de certains d'entre eux, je vais maintenant publier le résultat complet:

D'abord, je Sudo apt-get remove python3...

Ensuite, j'obtiens les sorties suivantes:

Sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python3:
 python3 depends on dh-python; however:
  Package dh-python is not configured yet.

dpkg: error processing package python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-notifier-common:
 update-notifier-common depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package update-notifier-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-update-manager:
 python3-update-manager depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apport-gtk:
 apport-gtk depends on python3; however:
  Package python3 is not configured yet.

dpkg: error processing package apport-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apturl:
 apturl depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package apturl (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core:
 ubuntu-release-upgrader-core depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apturl-common:
 apturl-common depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 apturl-common depends on python3-update-manager; however:
  Package python3-update-manager is not configured yet.

dpkg: error processing package apturl-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 3.168.9); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of aptdaemon:
 aptdaemon depends on python3; however:
  Package python3 is not configured yet.
 aptdaemon depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.

dpkg: error processing package aptdaemon (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-requests:
 python3-requests depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-requests (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apport:
 apport depends on python3; however:
  Package python3 is not configured yet.

dpkg: error processing package apport (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 update-manager depends on update-manager-core (= 1:16.04.13); however:
  Version of update-manager-core on system is 1:16.04.15.
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-urllib3:
 python3-urllib3 depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-urllib3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for gnome-menus:
 gnome-menus depends on python3:any (>= 3.1~); however:
  Package python3 is not configured yet.

dpkg: error processing package gnome-menus (--configure):
 dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent configuration of python3-distupgrade:
 python3-distupgrade depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-distupgrade depends on python3-update-manager (>= 1:0.196.2~); however:
  Package python3-update-manager is not configured yet.

dpkg: error processing package python3-distupgrade (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on ubuntu-release-upgrader-core (= 1:16.04.25); however:
  Package ubuntu-release-upgrader-core is not configured yet.
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.
 ubuntu-release-upgrader-gtk depends on python3-distupgrade (= 1:16.04.25); however:
  Package python3-distupgrade is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager-core:
 update-manager-core depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.
 update-manager-core depends on python3-update-manager (= 1:16.04.15); however:
  Package python3-update-manager is not configured yet.
 update-manager-core depends on ubuntu-release-upgrader-core; however:
  Package ubuntu-release-upgrader-core is not configured yet.

dpkg: error processing package update-manager-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gconf2:
 gconf2 depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package gconf2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 update-notifier-common
 python3-update-manager
 apport-gtk
 apturl
 ubuntu-release-upgrader-core
 apturl-common
 update-notifier
 aptdaemon
 python3-requests
 apport
 update-manager
 python3-urllib3
 gnome-menus
 python3-distupgrade
 ubuntu-release-upgrader-gtk
 update-manager-core
 gconf2

Sudo apt-get -f 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:
  appstream compiz-core compiz-plugins-default gnome-software-common guile-2.0-libs libapparmor-Perl libappstream3 libcompizconfig0 libdecoration0 libjemalloc1
  libmetacity-private3a libopencolorio1v5 libopenimageio1.6 libsnapd-glib1 libspnav0 libyaml-cpp0.3v5 metacity-common python-backports.ssl-match-hostname
  python-cached-property python-docker python-dockerpty python-docopt python-funcsigs python-functools32 python-jsonschema python-mock python-pbr python-texttable
  python-websocket python-yaml run-one snapd-login-service tmux
Use 'Sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apturl apturl-common python3-requests update-manager
Suggested packages:
  python3-ndg-httpsclient python3-openssl
The following NEW packages will be installed:
  python3-requests
The following packages will be upgraded:
  apturl apturl-common update-manager
3 upgraded, 1 newly installed, 0 to remove and 176 not upgraded.
21 not fully installed or removed.
Need to get 55,8 kB/619 kB of archives.
After this operation, 254 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://at.archive.ubuntu.com/ubuntu xenial-updates/main AMD64 python3-requests all 2.9.1-3ubuntu0.1 [55,8 kB]
Fetched 55,8 kB in 0s (537 kB/s)           
dpkg: warning: files list file for package 'python3.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-ipy' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-gdbm-dbg:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-speechd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-xlsxwriter' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pycurl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pil:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-cups' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.6' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-apt' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-dbus' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pyatspi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-plainbox' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-lxml' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-brlapi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-mako' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-commandnotfound' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-padme' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-xdg' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-six' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.5-venv' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pyparsing' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.6-minimal' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-guacamole' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-newt' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-aptdaemon.gtk3widgets' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-wheel' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-gi-cairo' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pkg-resources' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-gi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-bs4' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-apport' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-markupsafe' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.5-minimal' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-defer' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-problem-report' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-reportlab' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pyasn1' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-uno' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pexpect' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-chardet' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-aptdaemon' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-systemd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-jinja2' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-html5lib' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-minimal' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pip' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-cupshelpers' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-gdbm:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-software-properties' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-reportlab-accel:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-cairo' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-setuptools' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-aptdaemon.pkcompat' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.5-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-ptyprocess' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-checkbox-support' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-debian' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-renderpm:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-xkit' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-venv' missing; assuming package has no files currently installed
(Reading database ... 429592 files and directories currently installed.)
Preparing to unpack .../update-manager_1%3a16.04.15_all.deb ...
/var/lib/dpkg/info/update-manager.prerm: 6: /var/lib/dpkg/info/update-manager.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/update-manager_1%3a16.04.15_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/update-manager.postinst: 6: /var/lib/dpkg/info/update-manager.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../apturl_0.5.2ubuntu11.2_AMD64.deb ...
/var/lib/dpkg/info/apturl.prerm: 6: /var/lib/dpkg/info/apturl.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/apturl_0.5.2ubuntu11.2_AMD64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apturl.postinst: 6: /var/lib/dpkg/info/apturl.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../apturl-common_0.5.2ubuntu11.2_AMD64.deb ...
/var/lib/dpkg/info/apturl-common.prerm: 6: /var/lib/dpkg/info/apturl-common.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/apturl-common_0.5.2ubuntu11.2_AMD64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apturl-common.postinst: 27: /var/lib/dpkg/info/apturl-common.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Selecting previously unselected package python3-requests.
Preparing to unpack .../python3-requests_2.9.1-3ubuntu0.1_all.deb ...
Unpacking python3-requests (2.9.1-3ubuntu0.1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/update-manager_1%3a16.04.15_all.deb
 /var/cache/apt/archives/apturl_0.5.2ubuntu11.2_AMD64.deb
 /var/cache/apt/archives/apturl-common_0.5.2ubuntu11.2_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sudo apt-get install python3:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3 is already the newest version (3.5.1-3).
python3 set to manually installed.
The following packages were automatically installed and are no longer required:
  appstream compiz-core compiz-plugins-default gnome-software-common guile-2.0-libs libapparmor-Perl libappstream3 libcompizconfig0 libdecoration0 libjemalloc1
  libmetacity-private3a libopencolorio1v5 libopenimageio1.6 libsnapd-glib1 libspnav0 libyaml-cpp0.3v5 metacity-common python-backports.ssl-match-hostname
  python-cached-property python-docker python-dockerpty python-docopt python-funcsigs python-functools32 python-jsonschema python-mock python-pbr python-texttable
  python-websocket python-yaml run-one snapd-login-service tmux
Use 'Sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apturl apturl-common update-manager
The following packages will be upgraded:
  apturl apturl-common update-manager
3 upgraded, 0 newly installed, 0 to remove and 176 not upgraded.
22 not fully installed or removed.
Need to get 0 B/563 kB of archives.
After this operation, 1.024 B of additional disk space will be used.
Do you want to continue? [Y/n] 
dpkg: warning: files list file for package 'python3.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-ipy' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-gdbm-dbg:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-speechd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-xlsxwriter' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pycurl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pil:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-cups' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.6' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-apt' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-dbus' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pyatspi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-plainbox' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-lxml' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-brlapi' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-mako' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-commandnotfound' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-padme' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-xdg' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-six' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.5-venv' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-pyparsing' missing; assuming package has no files currently installed
...
dpkg: warning: files list file for package 'python3-setuptools' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-aptdaemon.pkcompat' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3.5-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-ptyprocess' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-checkbox-support' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-debian' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-renderpm:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-xkit' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python3-venv' missing; assuming package has no files currently installed
(Reading database ... 429618 files and directories currently installed.)
Preparing to unpack .../update-manager_1%3a16.04.15_all.deb ...
/var/lib/dpkg/info/update-manager.prerm: 6: /var/lib/dpkg/info/update-manager.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/update-manager_1%3a16.04.15_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/update-manager.postinst: 6: /var/lib/dpkg/info/update-manager.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../apturl_0.5.2ubuntu11.2_AMD64.deb ...
/var/lib/dpkg/info/apturl.prerm: 6: /var/lib/dpkg/info/apturl.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/apturl_0.5.2ubuntu11.2_AMD64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apturl.postinst: 6: /var/lib/dpkg/info/apturl.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../apturl-common_0.5.2ubuntu11.2_AMD64.deb ...
/var/lib/dpkg/info/apturl-common.prerm: 6: /var/lib/dpkg/info/apturl-common.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/apturl-common_0.5.2ubuntu11.2_AMD64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apturl-common.postinst: 27: /var/lib/dpkg/info/apturl-common.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/update-manager_1%3a16.04.15_all.deb
 /var/cache/apt/archives/apturl_0.5.2ubuntu11.2_AMD64.deb
 /var/cache/apt/archives/apturl-common_0.5.2ubuntu11.2_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Comment puis-je réparer mon installation python3 défectueuse sur mon système, quand apt-get et dpkg en dépendent ??

Merci d'avance!

1
ElectRocnic

Nous recommandons généralement de ne pas modifier votre version installée de Python3 pour cette raison.

Lorsque les utilisateurs veulent utiliser plusieurs versions ou des versions plus récentes de Python , nous recommandons les méthodes d'isolation (telles que les ordinateurs virtuels, python (3) -virtualenv ou chroots) pour: éviter d'endommager votre système. Il n’existe pas de méthodes dans les dépôts Ubuntu - nous ne les fournissons pas.

Il est probablement possible de réparer votre système, mais cela n'en vaut peut-être pas la peine . Beaucoup de dépendances peuvent être manquantes. dpkg ne dépend PAS de Python3, mais apt le fait certainement. La stratégie de base consiste à utiliser dpkg pour réinstaller les paquets manquants dont vous avez besoin pour apt.

Visitez http://packages.ubuntu.com et téléchargez les packages python-minimal et python3-minimal et apt, puis installez-les à l'aide de dpkg. Cela peut prendre quelques itérations, car dpkg se plaint de dépendances manquantes que vous devez télécharger et installer dans le bon ordre.

En règle générale, la plupart des utilisateurs qui ont rompu ou manqué Python trouvent qu'il est plus rapide et plus simple de simplement sauvegarder leurs données et de procéder à une nouvelle installation.

2
user535733