如何解决“子进程usr bin dpkg返回错误代码1”的错误?

当在Debian、Ubuntu等基于Debian的系统中遇到软件包安装错误时,可能出现'sub-process /usr/bin/dpkg returned an error code (1)'的问题。解决方法包括:重新配置软件包数据库,强制安装,删除错误原因的软件包,覆盖其他软件包文件以及自动删除不需要的软件包。
摘要由CSDN通过智能技术生成

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

删除错误原因包

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值