Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install the latest apache ant to centos. I did as follows:

  1. wget

  2. gzip -d apache-ant-1.8.2-bin.tar.gz

and I get the error as follows:

gunzip: apache-ant-1.8.2-bin.tar.gz: not in gzip format

However If do as follows:

  1. Download the tar.gz file from the GUI to a desktop folder
  2. Open up a terminal, navigate to the directory where the .gz has been downloaded.
  3. gzip -d apache-ant-1.8.2-bin.tar.gz
  4. tar -xvf apache-ant-1.8.2-bin.tar

Everything gets decompressed and extracted correctly.

But why does the first way does not work?

Thanks in advance

  • Dario
share|improve this question
$ wget
$ file apache-ant-1.8.2-bin.tar.gz 
apache-ant-1.8.2-bin.tar.gz: ASCII HTML document text, with very long lines

You just downloaded a link to the mirrors to download the files from

Hit the url on your browser and see. Grab the file from there
share|improve this answer
Hi Mike, Thanks a lot it makes complete sense now. I am trying to stay away from the gui or even a two step process of downloading the file and then ftp it over to the server. So Is there a way to use wget command to bring the actual .gz file down? – Viriato May 22 '11 at 22:28
yes.. like i said.. visit the page in your browser and use one of the mirror links – Mike May 22 '11 at 22:31
I dont think I udnderstand you, If I click on the mirror links I see how I can down the tar.gz but still if I grab the mirror link and append the file name and put that in the wget command is not working so this is what I did to solve it. I did a page/view source look at the url of tar.gz file that I am looking for and used that in my wget command it worked then – Viriato May 22 '11 at 22:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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