wget for Mac OS X
February 22nd, 2005Update: I’ve posted a new, updated version of wget for OS X which you may want to try instead.
If you want to grab files from the web using the command line, the wget utility is great.
Recent versions of Mac OS X don’t include it. They come with curl instead, which has some good features, but is also missing a great deal.
Here’s wget.zip, which contains wget built for Mac OS X 10.3.
Hope someone finds it useful!
Update: If you like this, you might also like my mtr for Mac OS X, or be interested in lots of other Apple-related stuff here.
February 26th, 2005 at 5:52 pm
Thanks for the binary. Wget is way better than safari for resuming downloads.
February 27th, 2005 at 3:00 am
Thanks Q — saved me some SERIOUS time waiting for Perl’s CPAN to try to find things with FTP since I didn’t have wget.
March 6th, 2005 at 3:45 pm
Many thanks. Am still puzzled why make and make install didn’t work, using the GNU download. Any suggestions for future reference?
March 6th, 2005 at 6:49 pm
Steve – I think I just used the instructions
here and built from the latest CVS.
There may have been some recent fixes which make building on the Mac easier. But I didn’t do anything clever!
March 30th, 2005 at 2:56 am
much appreciated, you the fella. wget for OSX is great, wget for OSX is good, it’s a delight. wget hooray! (ok i’m trying to get you more googlegoodness i admit it)
April 6th, 2005 at 7:52 pm
Thank you very much for providing this. I was a bit perplexed to find that it wasn’t included by default..
April 19th, 2005 at 3:47 pm
Thanks for this! Wget should come as default!
June 6th, 2005 at 11:47 am
Thanks, very useful indeed. Much less of a hassle than figuring out how to use curl; it’s –help screen scared me and made me run screaming to google for ‘wget mac’
June 10th, 2005 at 4:44 am
Thanks for compiling this. I think I’ve got it running, but your instructions left me a bit perplexed. I’m running OS X 10.3.9, and I don’t seem to have the three target directories you mentioned in the Readme file: /usr/local/bin, /usr/local/man/man1, and /usr/local/etc. (Actually, I now have a /usr/local/bin, but I think I accidentally created it in my newbie attempts to move wget to that location.)
Eventually, after a lot of clueless poking and searching, I decided that wget belonged in /usr/bin, and wget.1 should go in /usr/share/man/man1. I think it worked–wget responds when I invoke it, and I can get its man pages.
I never did figure out where the global wgetrc file belonged, though. Any ideas? Did Apple switch a lot of directories around when they went to 10.3.9?
Thanks!
June 10th, 2005 at 9:53 am
Hilary –
You can create those directories if you don’t have them, but it’s largely a matter of convention. Things in /usr/local are normally not part of the operating system and so won’t be overwritten by future releases of the operating system. If you put the binary in /usr/local/bin, you probably want to make sure that /usr/local/bin is also on your PATH just for convenience. But there should be no problem with having it in /usr/bin.
The exception here is the wgetrc. The binary *does* expect to find that in /usr/local/etc, but I don’t think there’s any problem if it’s missing. You can also put it, or variations on it, in your home directory as .wgetrc .
Quentin
June 26th, 2005 at 11:41 pm
Thanks! I love wget on my *nix boxes. Consequently I missed it on my Mac. I think it used to be included in the developer kit for OS X back in the 10.2 days… why-ever they “replaced” it with curl is beyond me
July 26th, 2005 at 12:41 pm
wget rules!! curl sucks!! thanks for compiling the wget to a binary !! he works great !!
August 18th, 2005 at 7:54 pm
thanks for this pre-built binary! was one of the first results on google
September 9th, 2005 at 2:42 am
Thanks – you’re a star!
September 18th, 2005 at 4:18 am
Thank you very much!
September 18th, 2005 at 6:24 pm
This is great. Thanks for making this wget build for OS X. THis is my first Mac box, the old ones were all Linux systems where I used this all the time. I even had wget for Win32 systems I built for others.
Thanks again!
September 23rd, 2005 at 6:38 pm
Just wanted to let everyone know this works in tiger too. I have been missing wget from mac and didn’t know about curl. Just copied to /usr/bin and worked great. Thanks!
October 1st, 2005 at 4:26 am
Hi there, just wanted to say a big thanks for WGet – fanstastic
(Prashaant, Aucklannd, NZ)
October 4th, 2005 at 1:37 am
You rock, thanks so much!!
October 25th, 2005 at 3:57 pm
Cheers dude, this saved me digging out the develop tools disc and fighting with ./configure
November 13th, 2005 at 5:52 am
Great, just stuck it in /usr/bin on 10.4 and good to go…thanks!
December 18th, 2005 at 3:55 am
I’m almost positive it’s possible to download an HTML and strip it of all HTML tags. Is it wget that can do this or am I thinking of another command that is (someone I know has done this) done after getting the HTML file?
December 31st, 2005 at 5:33 am
thanks
January 11th, 2006 at 8:28 pm
brad:
I think you mean ‘lynx’.
If you use it like
lynx URL >dump.txt
you’ll get a text variant of the requested page.
January 18th, 2006 at 1:19 am
Thanks for the binary. I ran it on Tiger, no problem. Great tool, I’m surprised Apple doesn’t include in their distribution.
January 20th, 2006 at 10:43 pm
Thanks for making the binary available for d/l.
John Rice: the reason wget is not on OS X, is that ‘wget’ is GPL’d; ‘curl’ uses the BSD License.
January 30th, 2006 at 5:52 pm
Big help man…danke.
February 12th, 2006 at 10:36 am
in all spirit of *nix-ness, you should just build it from darwin ports or fink.
February 12th, 2006 at 7:32 pm
Yes, but then, I think, it would be rather dependendent on those environments? Is that right? I have limited experience of fink and darwin ports, and while they’re good, I always end up installing quite a lot of stuff beyond the bit I want.
The main reason I rebuild packages like this is so they’ll run on a standard Mac OS X install without the need to install anything else. I’ve done bits of Bacula the same way.
February 16th, 2006 at 2:50 am
Just wanted to say thanks. I completely avoided having to install FINK on my virgin Tiger install.
February 22nd, 2006 at 6:40 pm
To do what’s called for in the Readme.txt you’ll need to issue these commands:
sudo mkdir /usr/local
sudo mkdir /usr/local/bin
sudo mkdir /usr/local/man
sudo mkdir /usr/local/man/man1
sudo mkdir /usr/local/etc
sudo cp wget /usr/local/bin/
sudo cp wget.1 /usr/local/man/man1/
sudo cp wgetrc /usr/local/etc/
But you could just do this one and it will work:
sudo cp wget /usr/bin
My favorite way to use wget is:
wget -r http://www.helpmedude.com
the -r is recursive and the web address will download to the current directory. use -l 5 to restrict the levels of recursion to 5 (default) or -l 0 for infinite.
NOTE: sudo is geek for “Switch User and DO this task” and since no user is given it switches to the “Super User” named root. It asks you for YOUR password (not root’s) the first time you run sudo. I think it times out in 15 minutes or when you close Terminal, so you may be prompted for your password again.
March 20th, 2006 at 5:02 pm
Thanks for this – it’s looks great, though I have a Terminal-newbie question (which is – hopefully – probably pretty basic).
I copied the files to the proper directories (some existed as hidden directories, and I created the others, via William Janoch’s commands above). But now, when I run Terminal and try Wget, it says it can’t find the command. I can double-click Wget and it launches fine. Is this something with changing the shell? Or somehow telling Terminal that a new command exists?
I also tried installing Wget via Darwin Ports, but – same thing – it can’t run Darwin Ports either after installation.
I am running the latest Tiger release on a G4 Powerbook.
Help?
March 20th, 2006 at 6:51 pm
Hi Devyn -
You may need to put the directory containing wget on your path. Typically you’d do this by editing the .bashrc or .bash_profile in your home directory to include something like:
export PATH=$PATH:/usr/local/bin
and then logging out and logging back in again.
Alternatively, you can try running the command by specifying the directory expliticitly:
/usr/local/bin/wget
You may have done this – apologies if this is obvious.
March 21st, 2006 at 4:47 am
That worked! Thank you!
And no… it was not obvious… (shrugs shoulders… newbie question answered… )
March 24th, 2006 at 8:55 am
Thank you so much for having this up on the web! You’re instructions were understandable, easy, and best of all, they worked! I wish every unix-related site was this wonderful!
March 25th, 2006 at 4:18 pm
Thanks qsf
That help me too.
April 3rd, 2006 at 8:53 pm
Like a charm, thanks a lot. PS: I almost didn’t survive your captcha check, and trust me I’m a human!
April 9th, 2006 at 4:40 am
Thanks indeed. Installing a whole package manager like darwin ports or fink just so I could have wget every time I switched computers or reinstalled the OS was getting old. This goes on “The CD.”
April 26th, 2006 at 3:27 am
Thank you, wget is an essential (Google PageRank love for you)
April 30th, 2006 at 12:19 pm
Another newbie question. I have OSX 10.4 and rarely used terminal. Under my /user/, there was no local folder at all. So I had to create all the folders, as stated in the readme. I tried qsf’s advise, but I probably didn’t understand it very well and made a mistake. Could someone please help me, a person who’s never used terminal? Thanks.
May 16th, 2006 at 2:04 am
thanks for this, i finaly managed to install wget useing the info here. however i have a question.
wenever i try to use wget, it returns the error
dyld: wget can’t open library: /usr/lib/libssl.0.9.7.dylib (No such file or directory, errno = 2)
Trace/BPT trap
i’m a unix nooblet maximus so i dont realy know what to do now.
any advice would be great.
May 16th, 2006 at 6:56 pm
I was shocked when I tried to use wget on 10.4 and to my astonishment:
patient_zero:~ root# wget blah.com
su: wget: command not found
so I went looking around and I couldn’t believe 10.4 did not come with wget.
BIG THANKS!
June 5th, 2006 at 12:08 pm
Running Tiger on a G4 PB.
All directories exist, and everything was put where it should be, but “man wget” doesn’t work.
Did I miss something?
thanks and well done :^)
June 5th, 2006 at 12:23 pm
Hi Alf –
The place where ‘man’ looks for man pages on Tiger is defined in /usr/share/misc/man.conf (see ‘man man’!).
You might either want to add an extra line ‘MANPATH /usr/local/man’, or copy wget.1 into a /usr/local/share/man/man1 folder, which is on the default path.
And ‘wget -h’ will also give you a pretty good summary of the options.
Quentin
June 6th, 2006 at 10:37 am
Thanks Q.
While I love the Mac, my Unix skills aren’t quite there yet. Still sussing out the directory structure (among many other things… :^)
And may I humbly add a “d’oh!” for not having thought of “man man” myself…!
:^)
June 17th, 2006 at 9:22 pm
Your 10.3 biuld work on 10.4.6 Intel. Thanks.
June 24th, 2006 at 7:38 pm
Quentin
I’m running Tiger 10.4.6 and I followed the instructions exactly. I had to create the man1 folder because I have man8 instead. Other than that I followed your instructions and copied all necessary files into the directories stated. It’s still not working. I didn’t modify my path variable but instead cd /usr/local/bin/wget and get “command not found”. Suggestions?
BTW thanks for this. I don’t like curl and want to be able to use wget on my mac.
July 23rd, 2006 at 7:31 pm
it works well on macbook, too.
Thanks, Rue
August 8th, 2006 at 5:19 pm
And if you don’t want to use the command line, there’s Deep Vacuum. wget with a graphical interface.
August 26th, 2006 at 4:53 pm
thanks a lot…i am a big user of wget! and you made my macbook pro experience easier
August 31st, 2006 at 2:38 pm
Will wget binary work for Tiger? (I’m a first-day Mac user…. long time Linux user.)
Thanks.
September 1st, 2006 at 4:50 pm
Thank you so much for this. I was going to use the Darwin port version but I didn’t want to have to install anything else on my clean(ish) OS X 10.4.7 system – this worked a treat.
September 17th, 2006 at 1:13 am
Thanks for making my life much easier!
September 18th, 2006 at 12:50 am
thank you!
September 21st, 2006 at 9:41 pm
Hi,
thanks for the great information. Can you point me to lateste binary release of wget for Mac?
Thanks in advance,
Mark
October 12th, 2006 at 7:47 pm
Thanks! I needed this for a CS project and I didn’t want to have to run it on our university’s crappy Ubuntu server.
Nick
October 24th, 2006 at 5:19 pm
Excellent, I usually needed to install Dev Tools to compile, much better with a precomiled binary. Curl blows. Ex.
curl -C – -O url/filename.dmg
wget url/filename.dmg
December 14th, 2006 at 2:52 pm
thank a lot!
December 28th, 2006 at 12:44 pm
Running 10.4.7 on an intel iMAC, and worked wonders. I did have to look at the comments for the appropriate place – maybe update the readme eventually. Works wonders, thanks!
January 7th, 2007 at 9:59 pm
Here’s a better way to build it:
./configure –prefix=/opt/local –infodir=/opt/local/share/info –mandir=/opt/local/share/man –with-ssl
make
sudo make install
/usr/local/bin is not normally in your PATH
January 7th, 2007 at 11:32 pm
Thanks, Dan. But /opt/local isn’t normally in your path either, unless you’re using MacPorts or similar. In wich case you probably wouldn’t need this package!
January 10th, 2007 at 12:43 pm
Thank you very much for your wget binary. Your binary worked fine on my PPC Mac with Tiger, with one small glitch. I use the programming language J (a modern dialect of APL) http://www.jsoftware.com/ and /usr/local/bin was not in the PATH for J to access, so a unix expert of the J community was able to tell me how to alter /etc/profile to get wget on the PATH by adding the following paragraph to /etc/profile as follows:
## brian added /usr/local/bin for wget start 1/9/7 12:51
## Do not remove the previous line
if [ `whoami` != "root" ]
then
PATH=”$PATH:/usr/local/bin”
export PATH
fi
## Do not remove the next line
## brian added /usr/local/bin for wget end 1/9/7 12:51
February 1st, 2007 at 6:43 am
Appreciation from Tokyo! Went to compile it to find the dev kit not installed on the new mac. You are a life saver.
February 4th, 2007 at 7:29 pm
Much appreciated from Oslo, Norway, thanks!
February 6th, 2007 at 12:56 pm
Works gret. Thanks.
March 4th, 2007 at 1:32 am
The wget package was very useful, tanks millions.
April 4th, 2007 at 7:56 am
I just posted an updated version of this on my blog, based on your work as well as the work done by a couple of others. The new version was compiled on OS X 10.4.9, on an intel-based MacBook.
September 6th, 2007 at 8:10 pm
Thanks for this. I had to use OS X at work, and curl -r doesn’t do what I wanted
wget rules!
September 21st, 2007 at 4:55 pm
Perferct! Thnx a lot for this neat util.
October 3rd, 2007 at 6:00 pm
Thanks, I needed this.
October 28th, 2007 at 2:38 pm
Thanks – very useful to find your site after a quick google. thought I was going to have to do the whole fink thing to get wget.
October 30th, 2007 at 7:45 am
And another thanks. such a simple but essential tool…how did i manage without it on my mac for so long??
November 10th, 2007 at 1:18 am
AWESOME! Thanks so much for putting this out there.
November 13th, 2007 at 12:20 am
much thanks for wget!
December 14th, 2007 at 12:30 am
спасибо за wget ! может у кого-то trafshow есть под mac os tiget ?
December 21st, 2007 at 10:06 pm
much thanks!
December 26th, 2007 at 12:13 am
Great Mate, great! Thanks
January 14th, 2008 at 1:31 am
thanks! you helped me out in a pinch.
didn’t feel like downloading and satisfying all of those darned dependencies just not.
January 20th, 2008 at 8:33 pm
Confirmed, works great with Leopard 10.5.1
May 6th, 2008 at 6:57 am
Thanks
I use 10.4.11 and following terminal commands worked for me without recompiling or configuring.
Placed unpacked folder in homefolder
cd wget
sudo su root (enter password)
mv wget.1 /usr/share/man/man1
mv wgetrc /usr/local/etc
mv wget /opt/local/bin/wget
July 14th, 2008 at 1:57 pm
Thanks! works with Leopard
July 30th, 2008 at 8:59 am
After 3 years i still come back here after every install to download the wget binary THANKS!!!
July 30th, 2008 at 9:52 am
yes I want to know what should I type in the terminal to download what I want e.g. youtube videos.
can you tell me how to install it properly because I read the read me & when I created
user/abdulrahman/local/bin
/man
/etc
I copied also the other files in the location where they are suppose to be but it didn’t work can you tell me exactly how to install it properly & how to use it to download youtube videos.
September 14th, 2008 at 12:24 pm
Thanks!
Its great if some people generate binaries.
October 2nd, 2008 at 5:16 pm
Thanks man, I really appreciate the time you took to compile it, and post this! Way to go!
October 31st, 2008 at 12:01 pm
Thanks very much for offering wget, why it is not included by default is a mystery!
November 22nd, 2008 at 1:34 pm
Thanks for the heads up!! Really useful information.
December 20th, 2008 at 12:25 am
i also thank you from the bottom of my heart! 6 hours saved
February 15th, 2009 at 2:12 pm
Older version worked fine for 10.3.9 — Thanks
October 26th, 2009 at 11:02 am
awesome, thanks!
March 31st, 2010 at 12:02 pm
Thanks so much. This still works on 10.4, whereas the newer one doesn’t.
June 30th, 2011 at 9:14 am
Thank you very much – this makes life much easier!
September 15th, 2011 at 12:52 am
r u sure that wget was ever part of mac osx…according to my recent post and comments on stackoverflow, it never was a part of mac osx….curious.