Ubuntu18.04 出现E: Sub-process /usr/bin/dpkg returned an error code (100)

时间:2024-07-17 00:04:20

You might want to reinstall dpkg by doing the following:

sudo -i
mkdir /tmp/dpkg cd /tmp/dpkg

Mind that you might want to look whether the download links are still up-too-date

If you are running a 32 bit version of ubuntu

wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5_i386.deb

For 64 bit

wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.8_amd64.deb

then

ar x dpkg*.deb data.tar.gz

tar xfvz data.tar.gz ./usr/bin/dpkg

Now copy the binary to /usr/bin with

sudo cp ./usr/bin/dpkg /usr/bin

And finally run

sudo apt-get update
sudo apt-get install --reinstall dpkg 原地址:https://askubuntu.com/questions/931115/how-can-i-fix-dpkg-error-code100