Installing wget On Your Mac For Terminal 16


Installing wget On Your Mac For Terminal


I like using Terminal, it is usually much more efficient and a lot quicker then the normal methods you use on your Mac. This post is about one widely used tool on UNIX and Linux systems, wget. Wget is a small program that can download files and folders to your computer through Terminal. There is already program similar to wget on your Mac, it is called curl. Although they do the same task, I prefer wget. When I tried curl on my computer it threw up lots of errors and problems. This post will tell you how to install wget and some simple basic usage. It is simple to do and really doesn’t take that long. I can’t take full credit for this tip, I took some of the steps from asitis.

The first step is to download the source code. Head over to the offical site and download the code directly. Once as you have downloaded the package unzip it. There will be a lots of funky files and folders. Thankfully we don’t have to deal with any of them. Open up Terminal and navigate to the folder wget is extracted in. For example:

cd ~/desktop/temp/wget-1.9.1

We know need to configure the package for your computer and install it. This is done slightly differently to normal packages and folders you may experience. In Terminal again type the following:


This will configure the packages and files for your computer. Then type:


This will make the files into a single binary file for use on your computer. Finally type:

sudo make install

This will copy the binary file into the correct location on your computer. Since the folder wget will copy into is a protected system folder, you will have to use the sudo command and an administrator password.

You have successfully installed wget. For example you can use wget to download zip files using the following command in Terminal.


Wget is designed to download files and web pages in Terminal but it can do a whole lot more. For some reason the link to the man page does not seem to work. So you can visit this URL instead.

You can do hundreds of different things with wget. It really is quite powerful and very easy to use. I recommend reading the man page to find out how to use it. You probably wont use it every day, but for anyone who likes using Terminal, or wants to play around with some more Unix commands, wget is a very fun one to use. If I remember correctly there was an old joke where you type “wget *.*” to download the entire internet.

If you want to take your skills with Terminal a bit further I recommend you check out the Terminal Category on this site. If you fancy reading a book there is a couple on Amazon that I regularly see mentioned and recommend, O’reilly Unix Geeks and Unix Under the Hood both are designed for Mac OS X and take Terminal further.

If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips

16 Responses to “Installing wget On Your Mac For Terminal”

  1. 1

    [...] Wget. I’ve used wget to download various files in the script. I think it is better than the built in version curl. If you don’t have it ready read the tutorial or download the file below (its not here because the download plug-ins screws with the css formatting). [...]

    Comment By Phone Home Anti-Robber Mac Security Script | Mac Tricks And Tips on September 3rd, at 9:43 pm

  2. 2

    thanks man this was very useful for my, Regards

    Comment By Felbape on September 1st, at 6:19 am

  3. 3

    Macintosh:wget-1.9.1 matt$ ./configure
    configuring for GNU Wget 1.9.1
    checking build system type… i386-apple-darwin9.8.0
    checking host system type… i386-apple-darwin9.8.0
    checking whether make sets $(MAKE)… no
    checking for a BSD-compatible install… /usr/bin/install -c
    checking for gcc… no
    checking for cc… no
    checking for cc… no
    checking for cl… no
    configure: error: no acceptable C compiler found in $PATH
    See `config.log’ for more details.
    Macintosh:wget-1.9.1 matt$

    Comment By Matthew Cornell on September 23rd, at 3:33 pm

  4. 4

    Muuuch better: A binary!

    Comment By Matthew Cornell on September 23rd, at 3:37 pm

  5. 5

    @Matthew: I had this same problem until I installed XCode 3.1.1 for OS 10.5.8. It is available free from apple. You do have to create a developer login, though.

    Comment By Neopsalmist on September 26th, at 2:44 pm

  6. 6

    I have read the above instructions (and many others very similar to these) and must be missing something very basic. I am new to the Unix terminal environment (last time I was at a command prompt was waaay back in the early days of MS DOS, although that is not to say that I wouldn’t be able to find my way around….). The problem I am getting is the “no acceptable C compiler found in $PATH” error, so I cannot create the file required when the “make” command is given. I have X Code installed (and it is even up and running at the moment), so I am left scratching my head – I am inclined to think that the ./Configure code is looking for X Code in the path, but as X Code is elsewhere on my system it isn’t finding this. Is my assumption correct? How do I go about correcting this? Your assistance would be very helpful.

    Many Thanks

    Comment By Robert on November 30th, at 8:41 pm

  7. 7

    Hi, as to the man page issue mentioned:
    I simply copied the wget.1 file from
    ..did the trick for me.
    note: I’m by far not an expert – follow at own risk
    PS: wget has made a good first impression

    Comment By Heiko on May 15th, at 4:58 pm

  8. 8

    Just what I needed to complete my auto mysql backup script!

    Comment By dmmcintyre3 on June 15th, at 6:05 pm

  9. 9

    These steps to install the wget package work – sure. However, being a new comer on Mac I think installing MacPorts or Fink once and then enjoying after that for single command installs.

    For example for me, once I installed MacPorts I had to run :
    sudo port install wget

    This will download all dependencies, compile them and install them.

    Comment By Madhur Tanwani on September 7th, at 1:45 pm

  10. 10

    To: Madhur Tanwani
    sure, ports are faster than run 4 commands (tar -xzvf wget[...], configure, make, make install) but still – first i wanted to install ports (as i red on first google result), then understood that i dont understand anything so i just did what was said here and voila – it works without all these strange ports that i never had used before and probably will not either. :)

    Comment By Edgars on September 8th, at 4:27 pm

  11. 11

    Hi Folks,

    Had the same issue as Matt,

    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-darwin10.4.0
    checking host system type… i386-apple-darwin10.4.0
    checking for gcc… no
    checking for cc… no
    checking for cl.exe… no

    .. after thinking it was admin rights for a half hour i scroll down and see the comment about Xcode… badaboombadabing! 3gigs and 3hours later I now have xcode and the iphone/pad sdk.

    I wish I was working on my computer rather then this stripped down office mac…

    ANyhoot, cheers for the advice chaps!

    Comment By Stefan on October 14th, at 5:10 pm

  12. 12

    Nice.. it works on me …

    thanks :)

    Comment By fay on November 24th, at 3:44 am

  13. 13

    a c compiler was not installed, so configure gave an error and make didnt exist

    Comment By mshenrick a linux user forced to use a mac on February 26th, at 2:06 pm

  14. 14

    Worked after installing xCode. Thanks!

    Comment By Jeff on March 22nd, at 5:04 pm

  15. 15

    Thanks. 1.12 ( confirmed working on Lion. You need Xcode installed.

    Comment By valvet on July 25th, at 6:35 pm

  16. 16

    [...] install PHPUnit we need to install pear.  To install pear, we need to install wget.  To install wget we need to become superuser (ah, the power!).   OK, wget installed.  Used [...]

    Comment By Stack of madness » Maps and Data on August 5th, at 4:54 am