dpkg
is a tool used to install packages into a Debian, Ubuntu, Mint, Kali or deb
based distribution. Generally package managers works without problem. But in some situations there may be some errors about package installation. One of the most popular dpkg
error is sub process usr bin dpkg returned an error code 1
. In this tutorial we will look different ways to solve this error.
dpkg
是用于将软件包安装到基于Debian,Ubuntu,Mint,Kali或deb
的发行版中的工具。 通常,程序包管理器没有问题。 但是在某些情况下,软件包安装可能会出现一些错误。 dpkg
最受欢迎的错误之一是sub process usr bin dpkg returned an error code 1
。 在本教程中,我们将寻找解决此错误的不同方法。
重新配置软件包数据库 (Reconfigure Package Database)
One of the first way is configuring package database. Package database holds installed package related information. If an package installation is interrupted this database may become corrupt. We need to repair and reconfigure this package database with the following command.
第一种方法是配置程序包数据库。 软件包数据库保存已安装的软件包相关信息。 如果软件包安装中断,则该数据库可能已损坏。 我们需要使用以下命令修复并重新配置此软件包数据库。
$ sudo dpkg --configure -a
强制安装 (Install Forcefully)
Some package installation may be interrupted and can not complete the installation because of the existing cache. We need to install forcefully which can be implemented like below.
由于现有的缓存,某些软件包安装可能会中断,并且无法完成安装。 我们需要强行安装,可以像下面这样实现。
$ sudo apt-get install -f