0

I'm trying to download a .tgz file under debian so I decided to use wget for this. This is my command line :

~$ wget http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz

I got the file and I want to tar so I do

~$ tar -zxvf netMETdistrib-4.5_5.8_20160322.tgz

and it says that

gzip: stdin: not in gzip format

So I check the file and this appear

netMETdistrib-4.5_5.8_20160322.tgz: HTML document, ISO-8859 text, with very long lines

wget transformed a tgz file in HTML and I don't know why.

Any ideas? Thx

5

http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz has a redirect enforced to http://www.netmet-solutions.org/Telechargement/Telechargement (a standard HTML page). So basically, you are not downloading the .tgz file, but a simple HTML page. The output of wget confirms the redirect:

➤ wget http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz
--2017-04-14 11:14:43--  http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz
Resolving www.netmet-solutions.org... 193.50.27.134
Connecting to www.netmet-solutions.org|193.50.27.134|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: /Telechargement/Telechargement [following]
--2017-04-14 11:14:44--  http://www.netmet-solutions.org/Telechargement/Telechargement
Connecting to www.netmet-solutions.org|193.50.27.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `netMETdistrib-4.5_5.8_20160322.tgz'

EDIT: Basically, you have to accept the CeCILL license , in order to download the archive (http://www.netmet-solutions.org/Telechargement/Jaccepte). To do this via wget, you will need to pass the expected cookie, in the header:

wget --no-cookies --header "Cookie: accepted_licence=chocolat" http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz

, where the resulted file will be recognized as gzip compressed data:

➤ file netMETdistrib-4.5_5.8_20160322.tgz
netMETdistrib-4.5_5.8_20160322.tgz: gzip compressed data, last modified: Tue Mar 22 12:39:36 2016, from Unix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.