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

software installation - How to install linux driver for a lb-link wireless usb adapter - Ask Ubuntu

permissions - Mount is denied because the NTFS volume is already exclusively opened - Ask Ubuntu