I am Hack Sparrow
Captain of the Internets.

How to install wget on your Mac

Installing wget on Mac OS X

Ok, so Mac is cool and stuff, but it doesn't come with wget by default, which in my opinion sucks. wget is a very useful tool and is used for downloading installation files among other stuff; it ought to be there on your Mac.

Getting wget on Mac OS X is pretty easy, so worry not. Just follow my instructions. Before that make sure you have a C/C++ compiler on your system, if you have XCode, you are all set and ready.

The first step, of course, is downloading the wget source code. We'll have to use our browser to download that since we don't have wget yet. Get the wget source from http://ftp.gnu.org/gnu/wget/, scroll down for the latest version. The latest version as of writing this post is wget-1.13.tar.gz.

Once you have downloaded the source, unarchive it using Archive Utility (just double-click the downloaded file to get a new folder which looks like wget-1.13). Now open a terminal, cd to wget-1.13 directory, and do the following:

$ ./configure
$ make install

There you! Now you have wget installed on your Mac. Confirm it this way.

$ wget http://ftp.gnu.org/gnu/wget/wget-1.13.tar.gz

Did wget fail to install because of some dependencies? Maybe you wanna go a less hardcore but very easy way, and manage all the packages on your system using Homebrew instead. Installing wget using Homebrew is as easy as doing this:

$ brew install wget

Homebrew is highly recommended for managing the UNIX packages on your Mac. I could have straightaway told you the Homebrew way but you'd have missed some valuable lessons if I did. The instructions for installing Homebrew can be found here. Get it!

10 Responses to “How to install wget on your Mac”

  1. Chris says:

    When I try this I still get “configure: error: no acceptable C compiler found in $PATH”

    I installed xcode from the App store, is that why?

  2. Captain says:

    Check your $PATH, it should have these at the min:


    If they are not there because of any reason, you need to add them back. Installing Xcode from App Store should not be a problem ideally.

  3. John says:

    Tried the ./configure method, failed at the following:

    configure: error: –with-ssl was given, but GNUTLS is not available.

    I’m guessing I could dig around and discover what else I need to do as a prerequisite……

    Followed the instruction for installing homebrew and tried the brew install wget and it works many thanks.

  4. Elijah Lynn says:

    @John – It appears as if we are supposed to append –with-ssl=openssl to the /.configure command, so try “./configure –with-ssl=openssl”, it worked for me on wget 1.13.4 (latest), I had the same issue as you did.

    source: http://comments.gmane.org/gmane.comp.web.wget.general/10245

    I did get a permission error when running make install after that but then ran sudo make install and I now have wget on my Mac at work!!!!


    Elijah Lynn

  5. Chris says:

    @Elijah thanks .. had the same problem, now fixed with openssl

  6. Stuart says:

    To fix the permission problem in mkdir /usr/local on OSX without homebrew, the exact command is:
    sudo -u root make install

    When prompted for password, enter the password for user who has the Admin role.

  7. buckbugs says:

    thanks for the info 🙂
    its really work on my snow leopard

  8. Jitendra Vyas says:

    I installed wget using brew but it’s not working in ZSH. do you know any solution?

  9. Nicole says:

    A HUGE THANK YOU to you, wget and make are successfully installed, and they work very well NOW! Thank you, and I want to give you a big hug! This article helps me a lot~

  10. Kannan Kumar says:

    Thank you for the making sure we get the “valuable lessons”. (besides getting Wget set up)
    Learning from experience is the best way 🙂

Make a Comment