debug sub process

How to debug sub process usr bin dpkg error code 1?

In Linux based operating system, dpkg is the tool used to install packages and softwares. Mostly it is used in Debian, Ubuntu, Mint, Kali and deb based distribution. This dbkg is the package manager that has to work without problem. This is the interface to install software and other packages. Thus every interface will produce error in the run. The most common error that is produced with dpkg is sub process usr bin dpkg returned an error code 1. When this error occurs, you will not be able to install any kind of software and need to solve the error.

In this tutorial on fixing the common dpkg error, you will understand lots of different ways to solve this error. If you are struggling to solve the issue, consider checking through the packages that need to get solved. Let us consider the following possible and try each step.

  • Reconfigure package database

To install a package or software, first step to consider is the package database configuration. The database holds the information related to package. If there is any error during the installation or any interruption occurs, then the package gets corrupted. Then we should repair and reconfigure the package database with the following command.

Linux based operating system

$sudo dpkg –-configure –a

This reconfigures and allows you to clear the error in the process.

  • Install forcefully

Due to few existing cache, installation of some packages are interrupted and we cannot complete the process. In this case, we need to install packages forcefully which can be done through the code implementation. Thus code to forcefully install a software package is

$sudo apt-get install -f

  • Remove error causing package

In few cases, some packages get overlapped. So it is necessary to consider the situation that of removing the error causing packing and installing the new package without error. The error causing package can be found with the error message. For example consider the error causing file name as geterr-repository. The code for removing this file is

$sudo apt-get remove –purge geterr-repository

  • Overwrite other package file

Alternative solution to this error message is overwriting the problem. The overwriting code to implement is

$sudo dpkg –i –force-overwrite/var/cache/apt/archives/libogremain-1.7.3_1.7.3-ogredev-natty3_i386.deb

  • Auto remove unneeded packages

If the error message stays even after implementing all these codes, we need to remove unnecessary packages with autoremove command. This is the safer option which will remove the unused packages.