Building wget for Mac OS X

March 5th, 2007 at 10:56 · Filed Under Computing, Mac OS X, Web 

wget is a very useful utility. It can retrieve files from the web using http or ftp protocols. Unfortunately, it does not come natively in Mac OS X. I had occassionally tried to use wget to download some html pages from some websites a few months ago but wget just wasn’t there. I was kind of lazy to download and compile the source until today, when I needed to download some 50 files from a website. I needed wget badly.

It took me not more than 5 minutes to download, build and install. I downloaded the latest and stable version 1.10.2 on Mac OS X 10.4.8.

  1. Download the source from http://ftp.gnu.org/gnu/wget/
  2. Unpack the tarball tar xzvf wget-1.10.2.tar.gz
  3. This creates a director wget-1.10.2. Change the working directory to it: cd wget-1.10.2
  4. Configure the build: ./configure
  5. Build: make
  6. Install: sudo make install
  7. wget should now be in /usr/local/bin

Comments

2 Responses to “Building wget for Mac OS X”

  • Lee on April 10th, 2009 23:28 1

    I know this post is old and you may have already figured this out, but mac comes with a program similar to wget called curl. I’m told curl has more features, but regardless they do the same thing. Syntax is different so you’ll want to man curl to get used to it. “curl -O ” is the basic wget equivalent command.
    See http://en.wikipedia.org/wiki/CURL for more info.

  • Adrian Hoe on April 12th, 2009 19:59 2

    Lee,

    Yes, I am aware of curl. The reason I stick with wget is that wget is a standalone utility itself rather than a utility which relies on supporting library like libcurl. Wget is also capable of recursive downloads which curl is not.

    Sometimes, an old utility program is much better than a new one.

    Anyway, thanks for the head up.

Leave a Reply