Wednesday, October 28, 2009

Building wget in Snow Leopard

I like Snow Leopard, it's a nifty OS, but occasionally something will baffle me. This evening it was the exclusion of wget from the command line tools.



Clearly this sucks and living without wget is not an option. Thankfully wget is free software so it's easy to grab the source and build it yourself.

Firstly you'll need to have Xcode installed with "Unix Dev Support". The Unix Dev Support option gives you gcc, make and other essential goodies. Xcode is on the Mac OS 10.6 DVD in the optional installs section (you can also download Xcode from Apple).

Next you'll need to grab the latest wget source from: ftp://ftp.gnu.org/pub/gnu/wget/ or click here.

To compile and install wget complete the following:

  1. Unpack the wget tarball by double clicking it in Finder.
    Take note of the name of the newly unpacked directory (something like wget-1.12).
     
  2. Open a terminal and cd to where you just unpacked (by default this will be the directory below).
    cd ~/Downloads/wget-1.*
     
  3. Run the configure script:
    ./configure
     
  4. Run the build and installer:
    sudo make install
     
  5. All done. Now you can delete the wget folder and tarball in your ~/Downloads directory. 

Once your done you'll be able to run wget in your terminal.



Much better.

2 comments:

Anonymous said...

sudo ports install wget

:)

Troy Test 1234 said...

That works too.

Post a Comment