16.04 - How do I recover from accidentally removing dpkg? - Ask Ubuntu


by mistake have removed dpkg pc (ubuntu 16.04). when running apt commands, showing error :

could not exec dpkg! e: sub-process /usr/bin/dpkg returned error code (100) 

can suggest me solution this. in advance !!!

to fix this, open terminal , download dpkg install dpkg package:

# i386: wget http://mirrors.kernel.org/ubuntu/pool/main/d/dpkg/dpkg_1.18.4ubuntu1_i386.deb # amd64 wget http://mirrors.kernel.org/ubuntu/pool/main/d/dpkg/dpkg_1.18.4ubuntu1_amd64.deb 

extract data.tar.gz file:

ar x dpkg_1.18.4ubuntu1_*.deb 

extract package contents data.tar.gz filesystem:

sudo tar xf data.tar.gz -c / . 

note: enough of dpkg working let use it. sure install dpkg package afterwards.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User