-2

I am on Linux mint

DISTRIB_ID=LinuxMint DISTRIB_RELEASE=20.3 DISTRIB_CODENAME=una DISTRIB_DESCRIPTION="Linux Mint 20.3 Una" 

I wanted to update my python3 to 3.10 or higher to run pmbootstrap. Somehow even when adding deadsnakes ppa the python higher versions were not shown. When installing python-alt over snap and then changing python3 alternative like in Python 3 version outdated on Mint 20.1

sudo update-alternatives --install /usr/bin/python3 python /usr/bin/python3.8 100 sudo update-alternatives --install /usr/bin/python3 python /snap/bin/python3-alt.3-13 200 

it ruined my python installation. python3 cannot be called anymore. my start button cannot be called. apt cannot be called. apt-get can be called but apt-get install or apt-get -f install anything will give me

dpkg: Fehler beim Bearbeiten des Paketes python3 (--configure): Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten es nochmal installieren, bevor Sie die Konfiguration versuchen. dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-dbus: python3-dbus hängt ab von python3 (<< 3.9); aber: Paket python3 ist noch nicht konfiguriert. python3-dbus hängt ab von python3 (>= 3.8~); aber: Paket python3 ist noch nicht konfiguriert. python3-dbus hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-dbus (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-gi: python3-gi hängt ab von python3 (<< 3.9); aber: Paket python3 ist noch nicht konfiguriert. python3-gi hängt ab von python3 (>= 3.8~); aber: Paket python3 ist noch nicht konfiguriert. python3-gi hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-gi (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-six: python3-six hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-six (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-apt: python3-apt hängt ab von python3 (<< 3.9); aber: Paket python3 ist noch nicht konfiguriert. python3-apt hängt ab von python3 (>= 3.8~); aber: Paket python3 ist noch nicht konfiguriert. python3-apt hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-apt (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-certifi: python3-certifi hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-certifi (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-chardet: python3-chardet hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-chardet (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-idna: python3-idna hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-idna (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-urllib3: python3-urllib3 hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. python3-urllib3 hängt ab von python3-six; aber: Paket python3-six ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-urllib3 (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-requests: python3-requests hängt ab von python3-certifi; aber: Paket python3-certifi ist noch nicht konfiguriert. python3-requests hängt ab von python3-chardet (<< 3.1.0); aber: Paket python3-chardet ist noch nicht konfiguriert. python3-requests hängt ab von python3-idna; aber: Paket python3-idna ist noch nicht konfiguriert. python3-requests hängt ab von python3-urllib3 (<< 1.26); aber: Paket python3-urllib3 ist noch nicht konfiguriert. python3-requests hängt ab von python3:any; aber: Paket python3 ist noch nicht konfiguriert. python3-requests hängt ab von python3-chardet (>= 3.0.2); aber: Paket python3-chardet ist noch nicht konfiguriert. python3-requests hängt ab von python3-urllib3 (>= 1.21.1); aber: Paket python3-urllib3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-requests (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert Fehler traten auf beim Bearbeiten von: python3 python3-dbus python3-gi python3-six python3-apt python3-certifi python3-chardet python3-idna python3-urllib3 python3-requests E: Sub-process /usr/bin/dpkg returned an error code (1) 

How do i best fix my python and computer and then upgrade my python?

EDIT: attempts to fix:

sudo update-alternatives --remove-all python3 [sudo] Passwort für gingerale: update-alternatives: Fehler: keine Alternativen für python3 

translation: error no alternatives for python3

sudo dpkg --configure --pending dpkg: Abhängigkeitsprobleme verhindern Konfiguration von apt: apt hängt ab von sqv (>= 1.3.0); aber: Paket sqv ist nicht installiert. apt hängt ab von libapt-pkg7.0 (>= 3.1.7); aber: Paket libapt-pkg7.0 ist nicht installiert. apt hängt ab von debian-archive-keyring; aber: Paket debian-archive-keyring ist nicht installiert. apt hängt ab von libc6 (>= 2.38); aber: Version von libc6:amd64 auf dem System ist 2.31-0ubuntu9.18. apt hängt ab von libssl3t64 (>= 3.0.0); aber: Paket libssl3t64 ist nicht installiert. apt hängt ab von libstdc++6 (>= 13.1); aber: Version von libstdc++6:amd64 auf dem System ist 10.5.0-1ubuntu1~20.04. dpkg: Fehler beim Bearbeiten des Paketes apt (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert dpkg: Fehler beim Bearbeiten des Paketes python3 (--configure): Paket ist in einem sehr schlechten inkonsistenten Zustand - Sie sollten es nochmal installieren, bevor Sie die Konfiguration versuchen. dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3-commandnotfound: python3-commandnotfound hängt ab von python3-apt; aber: Paket python3-apt ist noch nicht konfiguriert. python3-commandnotfound hängt ab von python3:any (>= 3.2~); aber: Paket python3 ist noch nicht konfiguriert. dpkg: Fehler beim Bearbeiten des Paketes python3-commandnotfound (--configure): Abhängigkeitsprobleme - verbleibt unkonfiguriert Fehler traten auf beim Bearbeiten von: apt python3 python3-commandnotfound 

dependency error apt.

sudo apt-get --configure apt-get: error while loading shared libraries: libapt-pkg.so.7.0: cannot open shared object file: No such file or directory sudo apt-get install libapt-pkg7.0 apt-get: error while loading shared libraries: libapt-pkg.so.7.0: cannot open shared object file: No such file or directory $ sudo apt-get install python3 apt-get: error while loading shared libraries: libapt-pkg.so.7.0: cannot open shared object file: No such file or directory 
1

1 Answer 1

5

You broke the python3 package, and that’s what’s causing the cascading failures in dpkg. To fix that, undo your changes:

sudo update-alternatives --remove-all python sudo dpkg --configure --pending 

You mustn’t try to upgrade the system Python interpreter, other packages rely on it. If you want a newer version of Python, use a virtual environment instead.

7
  • hello thanks for the reply, but i have some error messages with those commands (i added them to the main post due to character limit) Commented Oct 4 at 11:40
  • 1
    Ah, I misread the alternatives you used, see the fixed command. That won’t fix the dpkg errors — you’ve done more than you said in the post, haven’t you? You’ve got a partially-installed version of apt that’s newer than anything you should get in Linux Mint 20.3. Commented Oct 4 at 12:55
  • i tried to reinstall apt. so i am now backing up my stuff so i can reset my computer. probably i screwed it up beyond saving. Commented Oct 4 at 13:09
  • Fair enough — it’s probably possible to save your setup but figuring out how to do it would probably take more time than backing up and re-installing. Commented Oct 4 at 13:26
  • It used to be the only fix was a total reinstall & restore from backup as python was used for almost everything. Now it is only difficult to repair as a few critical files still can be run, but reinstall if generally easier, if you have good backups. Commented Oct 4 at 17:17

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.