Breaking News
Home / Sys Admin / Mac / How to install wget in Mac OSX?

How to install wget in Mac OSX?

wget is a great and simple command line tool that you can use to download a file (image, gz, binary etc.) that is located some where remotely on a web server.

e.g. you can see how wget is used below to download an image from a web server.

man-mini:~ mvohra$ wget
–2014-01-03 13:46:23–
Connecting to||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1353403 (1.3M) [image/png] Saving to: f-7-2568-1.png'

100%[===================================>] 1,353,403   87.4K/s   in 18s

2014-01-03 13:46:41 (73.7 KB/s) - f-7-2568-1.png’ saved [1353403/1353403]

It will download that file in the same folder from where the command was run from. Along with that it provides information about the size of the file and displays real time, the speed at which the file is getting downloaded. Wget comes installed on Unix OS by default but it is not available on the Mac OSX out of the box. However you can build it from the original source code and install it as follows:

Download Source, Build and  Install
– Download the wget source.

Yo can download the sources from the GNU ftp site by using the web browser and save it locally or download it via the command line using  the curl  tool.










OR use curl as follows:

curl -O

Uncompress the downloaded source file as:
tar -xzf wget-1.14.tar.gz

Now cd (change directory) to the uncompressed directory as:

cd wget-1.14

Now configure the sources for build with the –with-ssl flag to prevent a “GNUTLS not available” error as:

./configure –with-ssl=openssl

Build the source using the make command:


Finally install the wget that was just built using the following command :

sudo make install

Enter the root password when asked,  it will install wget in the /usr/local/bin folder.

Test your install using the following command:

wget –help

It will display a big output. Now you can delete the .gz file and uncompressed folder

cd ..

rm  wget-1.14.tar.gz

rm -rf wget-1.14[pb_builder]

Check Also


Howto disable MAMP PHP script cache?

MAMP 2.2 uses OPCache to cache PHP scripts. So if you make a change to …

Advertisment ad adsense adlogger