Install wget on OS X Lion

Article published Saturday, November 5th, 2011 at 9:32 pm

A pre-requisite for this to work is that you have the second disc of utilities that came with your Mac installed. This disc will provide a bunch of utilities required to compile code. Alternatively, you can Install Xcode from the App Store (it’s free!) and you will get all of the same utilities.

Run the following commands in a terminal window to compile wget on OS X Lion:

curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
tar -xzvf wget-1.13.4.tar.gz
cd wget-1.13.4
./configure --with-ssl=openssl
make
sudo make install
which wget #Should output: /usr/local/bin/wget

Note the with-ssl=openssl option in the command above. If you omit that, you will get the following error:

...
checking for compress in -lz... yes
checking for gpg_err_init in -lgpg-error... no
checking for gcry_control in -lgcrypt... no
checking for libgnutls... no
configure: error: --with-ssl was given, but GNUTLS is not available.
username@host:~/wget-1.13.4 $

The reason for this is that GNUTLS isn’t included with Mac OS X, but the equally usable library OpenSSL is available.

Hi, I’m Tom, and Renowned Media is my professional blog for web development tutorials. Traditionally, I’m a PHP/MySQL developer, but recently I’ve done a lot of JavaScript and Backbone.js development. Right now I’m really interested in Node.js and NoSQL technologies. I love developing on a mac and deploying apps to Linux servers.

Facebook Twitter LinkedIn Google+ 

Tags:

Category: OS X Tutorials

7 Responses to “Install wget on OS X Lion”

  1. Evan says:

    How are we supposed to wget the file if we don’t have it…

  2. Tom says:

    Worked like a charm on Snow Leopard! Thank you!!

  3. Ventola says:

    thanks very much for the openssl parameter, was supposed install gnutls libraries separately and found your post, thanks again.

  4. Paul Demers says:

    It is also important to note that you need to have Xcode installed in order to run the make command. I had a little bit of trouble until I figured that out. Thanks for the tutorial!

    • Good point, I’ve started taking for granted that the machines I use have Xcode installed since I’ve been using them in pre-installed environments.

  5. William says:

    Thanks a ton for the quick guide. Brand new to OSX, and didn’t realize that OpenSSL was the default SSL Package!

Leave a Reply