How to Install wget in OS X Lion

This quick walkthrough will show you how to install wget on your Mac running OS X Lion (10.7)

Installing wget is just a series of Terminal commands, which are listed below. However, you will need to have Xcode installed in order to compile and then install wget. If you don’t have Xcode installed, we have a tutorial on how to install Xcode in OS X Lion.

  1. With Xcode installed, open a Terminal (found in your Applications -> Utilities folder). Make sure you’re connected to the Internet and then enter the command:

    curl -O

    This will download the wget package.

  2. click to enlarge

  3. Now issue the command:

    tar -xzvf wget-1.13.4.tar.gz

    which will open the wget package.

  4. click to enlarge

  5. Next up, enter the command:

    cd wget-1.13.4

  6. click to enlarge

  7. Enter:

    ./configure --with-ssl=openssl

  8. click to enlarge

  9. Almost done. Type:


  10. click to enlarge

  11. Time to install – type:

    sudo make install

    You’ll be prompted to enter your password. Do so.

  12. click to enlarge

  13. Now wget will install on your Mac.

  14. click to enlarge

  15. Type:
  16. wget

    to confirm that wget did in fact install correctly. You should see the default wget response when issued without any parameters (see screenshot below).

    click to enlarge

  17. Done! You can now use wget on your Mac.

  • suda

    this explanation was so much better and more accurate than anything else I found. Thank you SO MUCH!!!

  • suda – glad it helped :)

  • Marcel

    yeah man thanks !!!

  • Chuck

    Mine didn’t work at Step 4. I tried 3 times and each time it fails at Step 4.

    I had Xcode open. I tried with Xcode not open. here’s what Terminal wrote back.

    configure: configuring for GNU Wget 1.13.4
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for a thread-safe mkdir -p… build-aux/install-sh -c -d
    checking for gawk… no
    checking for mawk… no
    checking for nawk… no
    checking for awk… awk
    checking whether make sets $(MAKE)… no
    checking build system type… i386-apple-darwin11.3.0
    checking host system type… i386-apple-darwin11.3.0
    checking for gcc… no
    checking for cc… no
    checking for cl.exe… no
    configure: error: in `/Users/chuck/wget-1.13.4′:
    configure: error: no acceptable C compiler found in $PATH
    See `config.log’ for more details

  • Chuck – that’s exactly the error message you would get if you didn’t have xcode installed. Did you skip that step?

  • Chuck

    Wow. Yeah, I installed it all right. I even rebooted just in case, I tried running the terminal commands with xcode open and with it not open. The ONE really unusual thing is that the link on installing Xcode reveals a different path than what I have. HD > Developer > Applications > xcode.

    My path is HD > Applications > xcode

    Could that affect anything? If that is true, what’s my alternative? In Mac OS I’ve never had to move an installation, etc., although apps do run fine from most anywhere. Lastly, could my firewall have anything to do with this? I noticed it was set to blocking all connections. I unchecked that and re-input the terminal commands. Same result.

  • Chuck

    Unlucky me. I copied the Xcode app to a hand-made Developer folder to match the path. Tried the Terminal commands again. Same result. Certainly something’s wonky.

  • Chuck – I know this is perhaps a silly question but you are using Lion as your OS X version, correct?

    Moving the Xcode app will almost certainly not help…

  • Chuck

    10.7.3, absolutely. I am wondering if I can side-step Terminal somehow to get wget configured (if that’s what has to happen first). There is a console item called configure in there.

  • Chuck

    Ross, here’s what I am attempting. I am running MAMP as a local web server. I am populating a WordPress theme and then wanting to have wget convert the site to static html. I have completely struck out with the WP plugin Really Static, even the latest unpublished version. So I landed here for wget instrux, thinking I can still pull this off.

    By the way, I love your site. Loaded with help — my friends will love you.

  • Chuck I just sent you an email to the address you used when you filled out the comment form. If that isn’t you actual address leave another comment w/ your actual email address (or one you don’t mind me using).

    To others that may be reading this and are having the same issue as Chuck – I just emailed him the compiled wget binary from my Mac. I’ll update here if that worked…

  • Chuck

    My search for a solution continues … but I’ll keep checking back here.

  • ap

    I’m having the same exact problem. Have Xcode installed, running OS X Lion.

    configure: error: no acceptable C compiler found in $PATH

  • Chuck

    I’m still searching the net. Rats! If I do find a way, I wil post back here.

  • Bradley

    Found solution:
    Launch your Xcode 4.1
    Go to preferences > Downloads
    Click on the “install” button near the “Command line tools”

  • Chuck

    Bradley!!! Worked! :-)

    Now, after Ross’ last instruction, i put the URL into the terminal and there was no capture, or did I misinterpret the next command?

  • Bradley

    Was there a 404 error, meaning the page did not load?

  • Chuck

    It works. And as I am running a web server in order to populate wordpress pages, it was my hope I could capture what I had populated into a static html structure. Which I can see now. I think my earlier comment(s) are under moderation for having also offered url’s to other ideas for all users coming here to read.

    Thanks so much, Bradley and Ross

  • Bradley –

    Thank you!! Now I have to figure out why on earth that was a default selection for me (ie. I didn’t have to do that, but you and Chuck did). I’ll update this tutorial shortly w/ your info. Thanks!!

  • Thank you, Bradley. I needed your advice to make the wget package.

    Bradley says
    Found solution:
    Launch your Xcode 4.1
    Go to preferences > Downloads
    Click on the “install” button near the “Command line tools”

  • Bradley

    My pleasure… kinda an odd way to get there. I think it was changed since the most recent update.

  • Art

    Bradley, you are awesome. Been trying to figure this out for months on my new macbook.

  • Bradley

    Art: Awesome!? Thank you :) Now if some super model might feel the same way I’d be set LOL. Enjoy your Mac.

  • jp

    I do all the steps though at the end of it I get bash wget nothing…

  • @415be7802ec271904b4c0b5cd249069b:disqus Do you get any errors at all when you issue the make and sudo make install commands?

    Update: And, are you using Lion? I haven’t tried this in Mountain Lion yet.