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

debian - Kali Linux - Debootstrap error Failed to determine codename for the release - Super User

crash - Windows Rundll32 (child process of DllHost) is crashing. How can I even identify it? - Super User

Windows XP installation, no previous version of Windows NT - Super User