Ubuntu – How to correct dpkg


I have a problem with dpkg. When I try to install software it gives error code

 E: Sub-process /usr/bin/dpkg returned an error code (100)

Output of ls -la /usr/bin/dpkg:

ls: cannot access /usr/bin/dpkg: No such file or directory

Best Answer

You deleted your dpkg and need to reinstall it.

Get dpkg eiter from the liveCD or here.
Make sure you select the correct version for your distro.

Since you don't have dpkg installed anymore you cannot use it to install the .deb file.
You have to use ar to unpack the .deb archive. (Use man ar for details).

Then copy dpkg in /usr/bin/, and use chmod 750 /usr/bin/dpkg to set the right permissions for the executable.

Related Question