Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When trying to do a wget for openfire. It doesn't download the actual file it should be getting.

When I did a vi on the file. It contained the following;

" tar.vim version v28 " Browsing tarfile /download-landing.jsp?file=openfire%2Fopenfire_sr " Select a file with cursor and press ENTER

gzip: /download-landing.jsp?file=openfire%2Fopenfire_src_3_7_1.tar.gz tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors

Why doesn't wget get the right file?

share|improve this question
    
What is the URL you're passing to wget? What happens if you put the same URL in a browser? Some generic advice: I have never had an issue with wget (but that doesn't mean you aren't). If downloading from a browser yields the same results as downloading from wget, that indicates there is either a problem with the URL or the server hosting the file. –  user76496 Jul 12 '12 at 6:31
add comment

1 Answer

up vote 1 down vote accepted

You have the incorrect URL.

Try this one:

wget -Oopenfire_src_3_7_1.tar.gz "http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_3_7_1.tar.gz"

Explanation: You were trying to download the landing page. The actual link above can be found on that page as "If a download window does not appear, please click here." -O just tells wget to name the output file sensibly.

share|improve this answer
    
Is -Oopenfire.. correct? –  Digital Fire Jul 12 '12 at 6:33
1  
@DigitalFire: Yes, that correctly names the downloaded file. If you leave it out you get: downloadServlet?filename=openfire%2Fopenfire_src_3_7_1.tar.gz :) –  izx Jul 12 '12 at 6:36
    
hmm.. let me test. Seems like a typo –  Digital Fire Jul 12 '12 at 6:37
    
Seems to be downloading. How wierd. –  Digital Fire Jul 12 '12 at 6:38
    
Is the -O a switch for wget? –  Digital Fire Jul 12 '12 at 6:39
show 3 more comments

Your Answer

 
discard

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.