无法安装软件--我可以修复丢失的 dpkg 吗?

无法安装软件--我可以修复丢失的 dpkg 吗?

无法安装新软件,因为当前安装的软件有问题。要立即修复吗?

Repair

Package operation failed 
The installation or removal of a software package failed.
Details => installArchives()failed:Could not exec dpkg!
Error in function

(synaptic:12725): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)
A package failed to install.  Trying to recover:
sh: 1: dpkg: not found

答案1

测试一下:

打开终端-按Ctrl+ Alt+T

运行:

sudo -i
mkdir /tmp/dpkg
cd /tmp/dpkg
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_i386.deb
# or
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_amd64.deb
ar x dpkg*.deb data.tar.gz
tar xvzf data.tar.gz ./usr/bin/dpkg
cp ./usr/bin/dpkg /usr/bin/
apt-get update
apt-get install --reinstall dpkg

相关内容