ubuntuusers.de

Post-Invoke-Success, apt-get update funktioniert nicht

Status: Gelöst | Ubuntu-Version: Ubuntu 18.04 (Bionic Beaver)
Antworten |

SteffenM94

Anmeldungsdatum:
30. Oktober 2018

Beiträge: 1

Hallöchen zusammen, ich es tauchte im oberen Bildschirmrand ein Symbol auf, welches mich darauf hinweist, dass bei der Suche nach Aktualisierungen Fehler aufgetreten seien. Nachdem ich nach Aktualisierungen gesucht habe, kam über die Paketverwaltung folgende Fehlermeldung:

E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

Daraufhin versuchte ich über das Terminal nochmal mit "sudo apt-get update" zu aktualisieren, daraufhin bekam ich folgendes:

OK:1 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu bionic InRelease
OK:2 http://de.archive.ubuntu.com/ubuntu bionic InRelease                      
OK:3 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease              
OK:4 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease            
OK:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Traceback (most recent call last):                  
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/CommandNotFound/db/creator.py", line 11, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 8, in <module>
    from CommandNotFound.db.creator import DbCreator
  File "/usr/lib/CommandNotFound/db/creator.py", line 11, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Paketlisten werden gelesen... Fertig
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

Ich habe bereits Beiträge mit ähnlichen Problemen gelesen aber keinen finden können, der mir wirklich weiterhilft. Danke im voraus

mgw2008

Anmeldungsdatum:
2. Februar 2009

Beiträge: 766

Das ist deine python Installation, die das Problem generiert - möglicherweise ein Versionskonflikt. Ein weiteres Problem könnte die Fremdquelle sein...

OK:1 http://ppa.launchpad.net/jonathonf/python-3.7/ubuntu bionic InRelease

Weitere Frage: Warum python 3.7 - kannst du nicht mit 3.6 leben?

Antworten |