Three years ago I compiled a version of the ‘wget’ utility so that it would run under Mac OS X and uploaded it to Status-Q. It’s had an amazing number of downloads, and I felt it was probably time to update it!
So here is a shiny new wget.zip, which contains the following:
- the wget binary
- the wget.1 man page
- the default wgetrc configuration file
- A README file telling you a bit more.
The main changes from the original version are:
- it’s a universal binary
- it’s the latest version of wget (1.11.4)
- it’s compiled on 10.5.4 and may possibly not work on older versions – please let me know in the comments if it does!
Hope it’s useful! Here’s some more of my Apple-related posts, or you could always just subscribe to the blog – here’s the RSS feed !
Most people know the simple use of wget:
wget [url]
to download whatever’s at [url]
But Jeff Veen’s post gives a nice example of just how powerful it can be…
http://www.veen.com/jeff/archives/000573.html
It does not work on 10.4.11. Error message recieved is:
—
$ wget
dyld: Symbol not found: _fnmatch$UNIX2003
Referenced from: /usr/local/bin/wget
Expected in: /usr/lib/libSystem.B.dylib
Trace/BPT trap
—
Guess I’ll have to run this over on my Leopard machine…
Thanks for the download. (I suppose the traffic will be high today because there are all kinds of links to your site going on right now.)
Newb alert! Everything installed OK, but I can’t seem to find a way to create an executable script to call wget commands in mac. I could do a batch script for wget in windows, but I’m blind on my new mac.
I tried to have Automator do this but no luck:
do shell script “wget htttp://thisismydesiredurl.com”
Terminal responds to manually typing in “wget htttp://thisismydesiredurl.com”, but I am in search of a way to launch the command via GUI/Finder as AppleScript or clickable file. What am I missing?
Awesome! thanks for porting this over to mac
Great job! thanks 🙂
Thanks!
Thank you for sharing this distribution of the wget code for mac os X
Regards Snoop1990
Have the same issue with Tiger –
dyld: Symbol not found: _fnmatch$UNIX2003
Referenced from: /usr/local/bin/wget
Expected in: /usr/lib/libSystem.B.dylib
for those of us who aren’t going to move to Leopard in the very near .. (might do just to get wget working hah!) would it be possible to provide a patch?
Nick – a quick note – my previous binary will work fine on all versions of Mac OS X – see the link to ‘the original version’ above.
I’m afraid I can’t easily build an up-to-date version for older versions of OS X at present, but I’ll try and get my hand on an older machine, or a disk on which I can install an older version, at some point!
$>man curl
Great!!! Thank you so very much!
Thanks, works great. Just what I need.
thx, it’s just ok on 10.5.5!!!
Thanks very much, i can’t find wget like powerful download utility for macosx. There are too many stupid only-interface tool, speeddownload, leech. all stupid.
i need just this :
wget -c -t 0 –http-user=myuser –http-passwd=mypass -i rapidshare_download_links.txt
Nice! Works perfectly.
Great job! I simply made a /usr/local/etc dir, moved the binary to /usr/bin, moved the man page to /usr/share/man/man1/ and moved the conf file to /usr/local/etc/
Worked like a charm on 10.5.5
Hi, thank you very much. It works on 10.5.5
Bye
moamahi
Thx man worked great on 10.5.5!
Nice! just works fine, and wget is very usefull
Thanks, you saved my day with this latest port! 🙂
PS: Works fine with 10.5.5!
Thanks again!!! 🙂
Thanks very much, appreciate it.
Thanks for this. Why does Apple make simple stuff some complicated?
> Why does Apple make simple stuff some complicated?
Because “You don’t need this” (c) Apple
This is perfect! Thank you for sharing it with all of us.
Thanks for providing this!
I’m trying to compile wget 1.11.4 on OS X 10.5.6 (I have XCode/Developer tools installed.)
‘./configure’ goes fine, but ‘make’ dies with this error:
make[1]: Nothing to be done for `all’.
cd windows && make CC=’gcc’ CPPFLAGS=” DEFS=’-DHAVE_CONFIG_H -DSYSTEM_WGETRC=\”/usr/etc/wgetrc\” -DLOCALEDIR=\”/usr/share/locale\”‘ CFLAGS=’-O2 -Wall’ LDFLAGS=” LIBS=’-ldl /usr/lib/libssl.dylib /usr/lib/libcrypto.dylib ‘ DESTDIR=” prefix=’/usr’ exec_prefix=’/usr’ bindir=’/usr/bin’ infodir=’/usr/share/info’ mandir=’/usr/share/man’ manext=’1′
make[1]: Nothing to be done for `all’.
Any idea why?
Thanks in advance!
Josh – that doesn’t look like an error – more that there’s just nothing to be done in that directory, either because it’s already built there or because the Makefile in that directory doesn’t specify any rules to be built. I note that it’s a directory called ‘windows’!
Are you sure it didn’t complete successfully leaving the resulting binaries in another directory? Don’t have the makefile here to look at, I’m afraid.
D’oh! You’re right! The compiled wget binary was in ./src.
I didn’t even notice the directory name of “windows” in the message I pasted here! I had assumed the build was breaking because it spent an extremely short time compiling and then spat out a whole bunch of ‘make[1]: Nothing to be done for `all’.’ messages for various directories. The combination of short compile time and lots of notifications made me think something was wrong.
Thanks for steering me in the right direction!
Josh
Hi,
I’m really new to Macs – so hopefully am not embarrassing myself with this question!
I was able to easily find and download the wget binary for Mac OS X 10.5.
I’m stuck on this though –
The Read Me file says this:
———————————————————————————————
Copy:
wget into /usr/local/bin
wget.1 into /usr/local/man/man1
wgetrc into /usr/local/etc
You may need to create those directories if they don’t already exist, and add /usr/local/bin to your PATH if it isn’t already there. If you’d rather not modify your PATH you can:
* call wget explicitly using /usr/local/bin/wget
* put it somewhere that is on your PATH, like /usr/bin.
This binary will, however, look for the system-wide configuration file wgetrc in /usr/local/etc, so it’s a good idea to have that in place if you can.
———————————————————————————————
When I tried to create the directory structure suggested above by going to the /usr directory and entering
> mkdir local
I got a “Permission Denied” message
When I go up a level and try to give myself permssions (I’m logged in as an administrator fyi) and type
> chmod 777 usr
I also get a “Permission Denied” message
When I try the alternate suggestion above and just go to the directory where the files were downloaded to and try to move them to the user directory by typing:
> move w* /usr/bin
I also get a “Permission Denied” message
Do you have any suggestions for helping me get unstuck? For example how do I change directory permissions on a Mac? – or any other suggestions?
Thanks!
Gerald
Gerald –
You’re doing the right things except that the /usr directory can only be modified by somebody with root (administrator) privileges. If you’re doing it at the command line, you need to prefix your commands with ‘sudo’ (which means ‘do as superuser’).
So you really want
sudo mkdir -p /usr/local/bin
sudo mkdir -p /usr/local/etc
sudo mkdir -p /usr/local/man/man1
sudo cp wget /usr/local/bin
sudo cp wget.1 /usr/local/man/man1
sudo cp wgetrc /usr/local/etc
The first ‘sudo’ will prompt you for your password, which will confirm that it really is you, the administrative user, sitting at the keyboard.
Hope this helps!
Quentin
Handy tool, not sure why this is not part of standard OS X release.
Hi Quentin,
Thanks, you’re always a useful place to look for this kind of thing. Hope this finds you and the family well.
~Matt
Similiar to 10.4.1 users, I’m using 10.3.9 still —
dyld: /usr/local/bin/wget Undefined symbols:
/usr/local/bin/wget undefined reference to ___stderrp expected to be defined in /usr/lib/libSystem.B.dylib
/usr/local/bin/wget undefined reference to ___stdinp expected to be defined in /usr/lib/libSystem.B.dylib
/usr/local/bin/wget undefined reference to ___stdoutp expected to be defined in /usr/lib/libSystem.B.dylib
Trace/BPT trap
Thank you for this.
I was having issues with the man page – Kripto’s solution worked like a charm:
“moved the binary to /usr/bin, moved the man page to /usr/share/man/man1/ and moved the conf file to /usr/local/etc/”
Great little utility.
Thanks a bunch!!
Like others, had to move the man page to /usr/share/man/man1.
Was a little surprised to find that my Mac had no wget, sigh…
AWESOME!!! THANKS!!
Thank you!
Been using wget on Linux for years. Now getting comfortable with Leopard.
Your instructions in README worked perfectly.
>> Why does Apple make simple stuff some complicated?
>
> Because “You don’t need this” (c) Apple
Because for most here, “curl” is all they’ll need. http://thatha.org/blog/wget-for-mac-os-x/
Hey, this is awesome, I am so used to Linux, and thought MAC is built on UNIX I should be easily familiar with it, not realizing 1/2 of the functionality of UNIX is not available. But this makes biting the bullet less painful. Thank a bunch.
thank you mr. quentin!
for those with megaupload premium , I use this command
wget –no-cookies –header “Cookie: user=5ea034xxxxxxxxxxxxx” –user-agent=”Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1″ -i /Users/rob/Downloads/mu-list.txt -o /Users/rob/Downloads/mu-log.txt -P /Users/rob/Downloads/ -b
you can check your megaupload cookie, login into your account using firefox
-i is a plain txt link list, -o logs download progress, -P is my files repository and -b stands for background
Thanks you are brilliant!
Thanks
[…] Oh und damit ich’s nicht vergesse, downloaden kann man sich das nette Progamm hier. […]
[…] The missing tool in Mac OS X is most likely wget. Here’s a (universal) port. […]
[…] I downloaded it for my machine from here […]
[…] for more info). Wget is a non-interactive network downloader. Mac users can try to get a binary here. Wget is a very powerful tool for many reasons, but it can be quite useful if you want to download […]
[…] So for this time, download the source code. Here’s a cleaned-up copy of my session when compiling MySQL. If you want to follow my steps verbatim, follow this instruction to install wget for Mac OS X. […]
[…] I really missed this one… wget for mac os x leopard can be found in Quentin Stafford-Fraser’s blog. […]