APT/Fehlerbehebung: Unterschied zwischen den Versionen

Aus Foxwiki
Zeile 33: Zeile 33:
* This is especially helpful if you were running installation and the process was interrupted
* This is especially helpful if you were running installation and the process was interrupted


====Force-Install the Software====
==== Force-Install the Software ====
If Method 1 does not work, you can attempt to fix the dependencies in the package installer
If Method 1 does not work, you can attempt to fix the dependencies in the package installer
  # apt-get install –f
  # apt-get install –f
Zeile 43: Zeile 43:
* A package manager helps keep track of dependencies for you
* A package manager helps keep track of dependencies for you


====Remove Bad Software Package====
==== Remove Bad Software Package ====
If you know which software caused the errors on your system, you can remove it
If you know which software caused the errors on your system, you can remove it


Zeile 52: Zeile 52:
* This helps get rid of all traces of the offending software
* This helps get rid of all traces of the offending software


====Clean Out Unused Software Packages====
==== Clean Out Unused Software Packages ====
If an old, outdated, or unused package is causing the problem, you can solve the problem by removing unused software packages
If an old, outdated, or unused package is causing the problem, you can solve the problem by removing unused software packages
  # apt autoremove
  # apt autoremove
Note: Avoid the next 2 options unless all other methods have failed
Note: Avoid the next 2 options unless all other methods have failed


====Remove Post Files====
==== Remove Post Files ====
If you know the name of the package that is causing problems, you can delete the files manually
If you know the name of the package that is causing problems, you can delete the files manually
* The installation files are usually located in the /var/lib/dpkg/info file
* The installation files are usually located in the /var/lib/dpkg/info file
Zeile 74: Zeile 74:
After which you can re-install the broken software again
After which you can re-install the broken software again


====Overwrite Package File====
==== Overwrite Package File ====
If you know the name of the package that is causing a problem, you can force an overwrite
If you know the name of the package that is causing a problem, you can force an overwrite


Zeile 87: Zeile 87:
* Note the exact filename, and type it into the previous command
* Note the exact filename, and type it into the previous command


===Quelle===
=== Quelle ===
# https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1
# https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1



Version vom 31. August 2024, 10:14 Uhr

Beschreibung

Fehler Beschreibung
Legacy keyring
Permission denied
[[#dpkg returned error | dpkg returned error
Dependencies error libc

sub-process /usr/bin/dpkg returned an error code (1)

The error message “Sub-process /usr/bin/dpkg returned an error code (1)” indicates a problem with the package installer

  • This can happen after a failed software installation, or if the installer becomes corrupted

The key phrase in this error is /usr/bin/dpkg

  • This refers to the dpkg package installer for Linux
  • A package installer is an application that tracks software, updates, and dependencies
  • If it is damaged, any new software installation will cause this error message

We cover several possible solutions, from easily solved and straightforward solutions to more complex processes

  • This guide will help you resolve the dpkg returned an error code 1 on an Ubuntu operating system

Options to Fix

Reconfigure dpkg Database

If your package database has become corrupted, reconfiguring it can repair it

# dpkg ––configure –a

This command reconfigures packages that have been unpacked but not necessarily installed

  • An interruption at the wrong time can cause this database to become corrupt
  • This is especially helpful if you were running installation and the process was interrupted

Force-Install the Software

If Method 1 does not work, you can attempt to fix the dependencies in the package installer

# apt-get install –f

The –f option means fix-broken

  • It repairs any broken dependencies in your package manager
  • Broken dependencies occur when a download is interrupted, or there is a problem with the cached download

Note: Dependencies are other software packages that are required by the software you are installing

  • A package manager helps keep track of dependencies for you

Remove Bad Software Package

If you know which software caused the errors on your system, you can remove it

Enter the command and package_name with the name of the software that is causing the problem

# apt-get remove ––purge package_name

The ––purge option directs the system to remove config files in addition to uninstalling

  • This helps get rid of all traces of the offending software

Clean Out Unused Software Packages

If an old, outdated, or unused package is causing the problem, you can solve the problem by removing unused software packages

# apt autoremove

Note: Avoid the next 2 options unless all other methods have failed

Remove Post Files

If you know the name of the package that is causing problems, you can delete the files manually

  • The installation files are usually located in the /var/lib/dpkg/info file

Type in the following command and replace package_name with the name of the broken software

# ls –l /var/lib/dpkg/info | grep –i package_name

This will generate a list of all references to the software you installed.You can then remove them by entering

# mv /var/lib/dpkg/info/package_name.* /tmp

This command moves the files to the /tmp directory, where they cannot affect your package manager

Next, update the package manager

# apt-get update

After which you can re-install the broken software again

Overwrite Package File

If you know the name of the package that is causing a problem, you can force an overwrite

Use the following command and replace full_name_of_package with the actual package name

# dpkg –i ––force–overwrite /var/cache/apt/archives/full_name_of_package

Note: If you do not know the actual name of the package, you can search for it with the following command

ls /var/cache/apt/archies/*package_name*

Replace package_name with the name of your software

  • This should return any instances of that package name
  • Note the exact filename, and type it into the previous command

Quelle

  1. https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1

dependencies error libc

Lösung

dpkg --configure -a
apt-get install ibritish iamerican ienglish-common ispell locales libc6=2.28-10 libc-bin=2.28-10
apt clean
apt autoclean
apt update
apt upgrade
systemctl restart sshd.service