0

I'm using 12.04. I'm unable to perform any installation or remove because I lost my dpkg at /usr/bin/dpkg.

I tried with following procedure:

mkdir /tmp/dpkg
cd /tmp/dpkg
wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4_i386.deb
ar x dpkg*.deb data.tar.gz
tar xfvz data.tar.gz ./usr/bin/dpkg
sudo cp ./usr/bin/dpkg /usr/bin/
sudo apt-get update

But I got an error after running that wget command:

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

tar (child): data.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

How can this be fixed?

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
newbie13
  • 111
  • 1
  • 5

1 Answers1

0

The next folders will be overwritten:

etc sbin usr var

so try:

tar -zxvf data.tar.gz -C /

Ruslan Gerasimov
  • 3,767
  • 3
  • 20
  • 22
  • hi ruslan..but, i got the same error with this tar -zxvf data.tar.gz -C / – newbie13 Aug 06 '14 at 05:23
  • `md5sum dpkg_1.15.5.6ubuntu4_i386.deb` gives for me `04d8f97f7c3b8e60f825a33b7c20649a` and is yours the same ? – Ruslan Gerasimov Aug 06 '14 at 05:40
  • md5sum dpkg_1.15.5.6ubuntu4_i386.deb.. i want to install this package or.. but, when i use that above procedure wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4_i386.deb – newbie13 Aug 06 '14 at 05:46
  • You didn't understand, you got something from the net, are you sure you have not corrupted file? For this `md5sum` exists. Could you please check. I am asking not simply, your file can be damaged. I could extract the same file without problem, so you have my md5sum, what's yours? No worries – Ruslan Gerasimov Aug 06 '14 at 05:49
  • i don't have much idea on this.. but, after md5sum dpkg_1.15.5.6ubuntu4_i386.deb .i try with this then i got two files like 6e3e7aa02298a0a940734dff4e8ff2ec dpkg_1.15.5.6ubuntu4_i386.deb.gz – newbie13 Aug 06 '14 at 05:57
  • you have wrong check sum, I know it, because I downloaded the same file from the place you posted, that makes me think you downloaded corrupted file - could you please download and try again? – Ruslan Gerasimov Aug 06 '14 at 06:15
  • yes, after doing this md5sum dpkg_1.15.5.6ubuntu4_i386.deb 04d8f97f7c3b8e60f825a33b7c20649a dpkg_1.15.5.6ubuntu4_i386.deb i got the same .. what can i do with those – newbie13 Aug 06 '14 at 07:00
  • hello ruslan are you there. i need your help for finding that..can you find out what it could be. – newbie13 Aug 06 '14 at 07:36
  • Hopefully after you downloaded it right it should work. – Ruslan Gerasimov Aug 06 '14 at 08:54
  • no i m not getting. still it occurs .can anyone help me – newbie13 Aug 07 '14 at 05:23