wget for Mac OS X Leopard

July 30th, 2008

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 !

Possibly-related posts:

57 Responses to “wget for Mac OS X Leopard”

  1. qsf Says:

    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

  2. Phil Miesle Says:

    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…

  3. Brian Says:

    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.)

  4. liquidparallax Says:

    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?

  5. gregory Says:

    Awesome! thanks for porting this over to mac

  6. Tedi Says:

    Great job! thanks :)

  7. awesome to the max » Blog Archive » wget für Leopard Says:

    [...] Oh und damit ich’s nicht vergesse, downloaden kann man sich das nette Progamm hier. [...]

  8. Nazmul Hassan Says:

    Thanks!

  9. Snoop1990 Says:

    Thank you for sharing this distribution of the wget code for mac os X

    Regards Snoop1990

  10. Nick Sargeant Says:

    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?

  11. qsf Says:

    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!

  12. wget for Mac OS X | Tuinslak Says:

    [...] The missing tool in Mac OS X is most likely wget. Here’s a (universal) port. [...]

  13. Adam Says:

    $>man curl

  14. John Says:

    Great!!! Thank you so very much!

  15. Enrio Says:

    Thanks, works great. Just what I need.

  16. lvyile Says:

    thx, it’s just ok on 10.5.5!!!

  17. Mehmet Fatih YILDIZ Says:

    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

  18. Matthew Ratzloff Says:

    Nice! Works perfectly.

  19. Kripto Says:

    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

  20. moamahi Says:

    Hi, thank you very much. It works on 10.5.5

    Bye

    moamahi

  21. Björn Says:

    Thx man worked great on 10.5.5!

  22. Pablo Miranda Says:

    Nice! just works fine, and wget is very usefull

  23. André Elias Says:

    Thanks, you saved my day with this latest port! :-)

    PS: Works fine with 10.5.5!

  24. yile Says:

    Thanks again!!! :)

  25. :-[] :-|| Vivek Khokhar rambles here :-O :-[] » Blog Archive » Wget came to my rescue Says:

    [...] I downloaded it for my machine from here [...]

  26. John Says:

    Thanks very much, appreciate it.

  27. grl Says:

    Thanks for this. Why does Apple make simple stuff some complicated?

  28. ping Says:

    > Why does Apple make simple stuff some complicated?

    Because “You don’t need this” (c) Apple

  29. Andrea Says:

    This is perfect! Thank you for sharing it with all of us.

  30. Josh Says:

    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!

  31. qsf Says:

    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.

  32. Josh Says:

    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

  33. Gerald Says:

    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

  34. qsf Says:

    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

  35. Kumar Says:

    Handy tool, not sure why this is not part of standard OS X release.

  36. Matt Doar Says:

    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

  37. =amante Says:

    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

  38. Bill Says:

    Thank you for this.

  39. Evan Anderson Says:

    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.

  40. Anne Says:

    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…

  41. Chris Says:

    AWESOME!!! THANKS!!

  42. Angelo Black Says:

    Thank you!
    Been using wget on Linux for years. Now getting comfortable with Leopard.
    Your instructions in README worked perfectly.

  43. Ron Says:

    >> 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/

  44. Churk Says:

    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.

  45. Use wget to download large directories recursively - deepcode.net Says:

    [...] 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 [...]

  46. Microshell » Rebuilding MAMP stack from scratch. Says:

    [...] 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. [...]

  47. rob Says:

    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

  48. Wget for mac os x leopard | Mazais melnais blociņš pierakstiem Says:

    [...] I really missed this one… wget for mac os x leopard can be found in Quentin Stafford-Fraser’s blog. [...]

  49. Laurei Says:

    Thanks you are brilliant!

  50. ivanvx Says:

    Thanks

  51. Eric Says:

    Works in 10.5.2

  52. Israel D. Canasa Says:

    Perhaps I missed it, but I don’t see a reason why you should use this when wget is available through the Mac OS X Ports package. Installing it is as simple as “port install wget”.

  53. qsf Says:

    Israel -

    I use Ports too, but a lot of people don’t, and if you just want wget, this saves you installing all that other stuff, changing your path, etc.
    That’s the only reason, really.

    Quentin

    [WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

  54. Jason Says:

    Nice it works like a charm. Thanks a bunch.

  55. BaRoN Says:

    Thanks a lot for this binary, works fine on 10.5.7. I’d like to not download macports or smth to make wget working, and this binary is perfect for this :)

  56. bakes.wordpress.com/ Says:

    Works fine on 10.5.2

  57. dave k Says:

    Or just call me by my physical state: frontallabotomy… I seem to have installed wget OK: files are where they should be. I ran the line wget http://www.epscor.hawaii.edu/ but all I got was the one index file and (of course) I was expecting the entire site. Any suggestions? Thanks, dk

Leave a Reply

Powered by WP Hashcash