Mac OS X 10.9 Mavericks comes with the command line utility called ‘curl‘ which is a network transfer tool, it does not come with the popular ‘wget‘, in fact ‘curl‘ can probably get you by just fine, check man curl at the command line to see its usage.
Otherwise let’s look at getting ‘wget‘…
To add and install wget to your system you need to download the source files, compile the code and make an install. To actually compile the code you need a compiler, unfortunately it doesn’t come with OS X by default you need to install the free xcode suite from Apple which includes the GCC compiler. This process also works exactly the same in OSX 10.8 and OSX 10.7.
Get the latest Xcode (5.0.1) from the Apple app store, free download version, then install and launch it.
Next you need to install the Xcode command line tools, easiest way to do so by running in the Terminal:
Go to Xcode, Preferences then the Locations and select the 5.0.1 ‘Command Line Tools’
Using curl to get wget
Get the latest wget source code from the ftp repository, or using curl from the command line:
Extract it and move into it
tar -zxvf wget-1.14.tar.gz
Configure and Install it
an error may occur on SSL…
configure: error: --with-ssl was given, but GNUTLS is not available.
wget needs to have some type of SSL support GNUTLS is most probably not available on your OS X system – if so use OpenSSL in the configure as an alternative use so re-run the configure with an SSL flag:
sudo make install
Thats it done, wget will be installed in:
Remove the source code and compressed file:
rm -rf ~/Downloads/wget*
Everything should work out fine – if you need to install more Unix style tools it will be faster and better to install a Package Manager for OSX like Homebrew – it makes installing and maintaining these applications so easy,