E: Sub-process /usr/bin/dpkg returned an error code (1) 解决办法

Emma ·
更新时间:2024-11-10
· 997 次阅读

在 Ubuntu 执行 sudo apt-get install 时,出现了如下的报错:

Setting up ssh (1:7.6p1-4ubuntu0.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
Processing triggers for dbus (1.12.2-1ubuntu1.1) ...
Errors were encountered while processing:
 rsyslog
E: Sub-process /usr/bin/dpkg returned an error code (1)

通过执行下面的命令可以解决该问题:


$ sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
$ sudo mkdir /var/lib/dpkg/info/
$ sudo apt-get update
$ sudo apt-get -f install
$ sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/
$ sudo rm -rf /var/lib/dpkg/info
$ sudo mv /var/lib/dpkg/info_old/ /var/lib/dpkg/info/

输入上述命令之后,在执行 sudo apt-get update 和 sudo apt-get upgrade 就不会有问题了。


作者:zuixin369



process error dpkg sub bin

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章