Skip to content

Latest commit

 

History

History
117 lines (106 loc) · 7.84 KB

ERROR.md

File metadata and controls

117 lines (106 loc) · 7.84 KB

Inhalt

  1. Error: E: Sub-process /usr/bin/dpkg returned an error code (1)
  2. Error: E: Sub-process returned an error code
  3. Error: E: Sub-process /usr/bin/dpkg returned an error code (1)
  4. Error: PermissionError: [Errno 13] Permission denied: '/home/bhtcsuperuser/.local/share/jupyter/runtime/kernel𔂱fe23b590749.json'

1. Error: E: Sub-process /usr/bin/dpkg returned an error code (1)

  • Ausgabe:
    Errors were encountered while processing:  
     /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_i386.deb  
     /var/cache/apt/archives/libnvidia-gl-390_390.48-0ubuntu3_amd64.deb  
    E: Sub-process /usr/bin/dpkg returned an error code (1)  
    
  • Lösung:
    • LC_MESSAGES=C dpkg-divert --list '*nvidia-340*' | sed -nre 's/^diversion of (.*) to .*/\1/p' | xargs -rd'\n' -n1 -- sudo dpkg-divert --remove
      • sudo apt --fix-broken install

2. Error: E: Sub-process returned an error code

  • Eingabe: sudo apt-get update && sudo apt-get dist-upgrade
  • Ausgabe:
    OK:2 http://de.archive.ubuntu.com/ubuntu bionic InRelease                      
    OK:3 http://dl.google.com/linux/chrome/deb stable InRelease                     
    OK:4 http://de.archive.ubuntu.com/ubuntu bionic-security InRelease             
    OK:5 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease              
    OK:6 http://de.archive.ubuntu.com/ubuntu bionic-proposed InRelease             
    OK:7 https://packages.microsoft.com/repos/ms-teams stable InRelease            
    OK:8 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease            
    OK:1 https://mirror.dogado.de/tex-archive/systems/win32/miktex/setup/deb bionic InRelease
    sh: 1: /usr/lib/cnf-update-db: not found            
    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
    
  • Lösung:
    • cd /etc/apt/apt.conf.d/
    • sudo nano ./50command-not-found
    • Letzen Zeilen auskommentieren:
      # Refresh AppStream cache when APT's cache is updated (i.e. apt update)  
      #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";
      #};
      

3. Error: E: Sub-process /usr/bin/dpkg returned an error code (1)

  • Eingabe: sudo apt upgrade
  • Ausgabe:
     ...  
     Fehler traten auf beim Bearbeiten von:  
       python3  
       python3-update-manager  
       software-properties-kde  
       apport-gtk  
       ubuntu-release-upgrader-core  
       python3-apport  
     Bearbeitung wurde angehalten, da zu viele Fehler auftraten.  
     E: Sub-process /usr/bin/dpkg returned an error code (1)
    
  • Lösung:
    • Aufräumen: sudo rm /var/crash/*
    • Datei mit nano bearbeiten: sudo edit /etc/default/apport
    • Wert 1 auf 0 setzten:
     # set this to 0 to disable apport, or to 1 to enable it  
     # you can temporarily override this with  
     # sudo service apport start force_start=1  
     enabled=0
    
    • sudo sed -i s,//de.archive,//archive,g /etc/apt/sources.list
    • sudo apt update && sudo apt install --reinstall hplip-data
    • wenn die vorherigen beiden Schritte nicht gehen:
      • wget -c http://mirrors.kernel.org/ubuntu/pool/main/h/hplip/hplip-data_3.17.10+repack0-5_all.deb
      • sudo dpkg -i hplip-data_3.17.10+repack0-5_all.deb

4. Error: PermissionError: [Errno 13] Permission denied: '/home/bhtcsuperuser/.local/share/jupyter/runtime/kernel𔂱fe23b590749.json'

  • Eingabe:
    • Spyder öffnen
  • Ausgabe:
    • in Spyder Terminal:
      • Traceback (most recent call last): File "/usr/local/lib/python3.8/dist‑packages/spyder/plugins/ipythonconsole/plugin.py", line 1568, in create_kernel_manager_and_kernel_client kernel_manager.start_kernel(stderr=stderr_handle, File "/usr/lib/python3/dist‑packages/jupyter_client/manager.py", line 301, in start_kernel kernel_cmd, kw = self.pre_start_kernel(**kw) File "/usr/lib/python3/dist‑packages/jupyter_client/manager.py", line 248, in pre_start_kernel self.write_connection_file() File "/usr/lib/python3/dist‑packages/jupyter_client/connect.py", line 468, in write_connection_file self.connection_file, cfg = write_connection_file(self.connection_file, File "/usr/lib/python3/dist‑packages/jupyter_client/connect.py", line 138, in write_connection_file with secure_write(fname) as f: File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/usr/lib/python3/dist‑packages/jupyter_core/paths.py", line 437, in secure_write with os.fdopen(os.open(fname, open_flag, 0o0600), mode) as f: PermissionError: [Errno 13] Permission denied: '/home/bhtcsuperuser/.local/share/jupyter/runtime/kernel𔂱fe23b590749.json'
    • im Ubuntu Terminal:
      • Cannot create directory /home/bhtcsuperuser/.local/share/Spyder/QtWebEngine/Default. Error: FILE_ERROR_ACCESS_DENIED.
  • Lösung
    • sudo chown -R user:user ~/.local/share/jupyter
    • The first user before the colon is your username, the second user after the colon is your group. If you get chown: [user]: illegal group name, find your group with groups, or specify no group with sudo chown user: ~/.local/share/jupyter.

Notes