Install wget on Mac OS X

When you are a Linux user, you are so familiar to wget command. In simple words, it is a command to download file from a given URL and port. Most Linux users and some windows users are familiar to this handy command download tool and on most Linux distributions it is pre-installed, but on Max OSX it is not installed and Apple does not offer it in AppStore, so the suer should install it manually, which is so straightforward, fast and easy.

In this tutorial I want to describe how to install wget on Mac OS X.

Thing we will go through in this tutorial:

    1. Download the last version of wget
    2. Make the downloaded package ready
    3. Installation process

Things you need to have installed on your Mac OSx:

  • Have C compiler inorder to compile he wget source code which you can have it installed via installing xCode. (For more info, check out the comments)

1. Download the last version of wget

We are going to use the official download location of wget. Go to the link below and download the latest version of wget in .tar.gz format:

2. Make the downloaded package ready

This step is also easy, we should extract the .tar.gz file and that’s it 😀  (In this tutorial i’m going to use the  wget-1.14.tar.gz  which is the latest version at the moment of writing this article)

cd Downloads
tar -xzf wget-1.14.tar.tar.tar.gz


3. Installation process

When you extract the downloaded file with the command above, a directory will automatically been created near the .tar.gz file with similar name, so we should go in that directory:

cd wget-1.14

Then we should run the configuration file with the desired options:

./configure --with-ssl=openssl

Now it is the time to start the automated compiling and installation by using the following commands:

sudo make install

The sudo which is in front of the command above will ask you the administration password, so the installation be able to proceed.

By now the wget should be successfully installed on you Mac, however you can simply check if the installation was successful or not by asking the Mac to show the help of wget:

wget --help

If you see the help document, then the wget is perfectly installed. Now that everything is done correctly, it’s time to cleanup the mess :D. use the following commands to remove unnecessary files and folders:

cd ..
rm -rf wget-*

15 thoughts on “Install wget on Mac OS X”

  1. It’s not enough to just install xcode as per your macobserver link, because the command line tools are not installed by default. In xcode you need to go into preferences > downloads and then under components, find “Command Line Tools” and hit “Install”.

    I learned this from here:

    In the end I was able to install wget with your instructions, plus the xcode instructions, plus the instructions from ‘mfram’ and ‘laredotornado’ from the macrumors forum, but it was not the straightforward, easy process you mention in your opening paragraph.

    Xcode was a 1.65 GB download and the command line tools added another 100MB. Was it worth downloading and installing a 1.75 GB app in order to have wget?

    Not sure – but maybe you should add a note to your instructions that a c compiler is required. 🙂

    Thanks anyways, as I do now have a working “wget”… it was just a much more involved process than I was expecting.

  2. I already had XCode installed, but not the CLI tools (thanks Steve!).

    However after I ran Configure the last line was

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

    Any thoughts?

    I followed the thread that Steve left in his comments but there was no reference to GNUTLS in those forums.

    I did find this page with recipe, but it sounds a lot more complicated than your version.


  3. Great and simple. Thanks very much.
    To those with GCC issues all I did was to run gcc -v and it popped up a box asking if I wanted to install command line tools (and also gave the option of the full blown stuff). The command line tools installed in a few mins and I was back on with the tutorial.
    I am a newbie (on Mac) running OSX10.9.

Leave a Reply to Mark Cancel reply

Your email address will not be published. Required fields are marked *

This is new type of CAPTCHA, make the puzzle please !WordPress CAPTCHA