I have host without dpkg
so I need to install it.
I followed the instructions from here and here.
On both of these answers they wrote that I need to download the file:
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_i386.deb
or
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_amd64.deb
and use tar
like that:
tar x dpkg*.deb data.tar.gz
tar xfvz data.tar.gz ./usr/bin/dpkg
cp ./usr/bin/dpkg /usr/bin/
But after running tar x dpkg*.deb data.tar.gz
it failed:
[root@webtl1 ~]# tar x dpkg*.deb data.tar
tar: Refusing to read archive contents from terminal (missing -f option?)
tar: Error is not recoverable: exiting now
I followed this link:
https://askubuntu.com/questions/143107/how-to-extract-archives-to-file-system-in-terminal
And tried to use tar xvzf dpkg*.deb data.tar.gz
but it also failed:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Any idea how I can tar
the deb
file to data.tar.gz
?
EDIT:
If you want to reproduce go to:
https://www.katacoda.com/courses/prometheus/getting-started
run:
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.17.5ubuntu5.2_amd64.deb
and then try tar x dpkg*.deb data.tar.gz
.
tar xvzf dpkg*.deb data.tar.gz
– ryekayo Jan 15 '19 at 20:55ar x
. – Michael Homer Jan 15 '19 at 21:10