≡ Menu

Mac OS X: Install wget Network Downloader Utility

I recently learned that “wget” can continue getting a partially-downloaded (resume download) file. I am unable to find wget command on Mac OS X. How do I install install wget on Mac OS X (Mountain Lion/ Mavericks / Snow Leopard)? How can I install wget in Mac OS X without 3rd-party repo such as Homebrew or MacPorts?

You can install the latest version of GNU/wget and many other open source software without using Homebrew or MacPorts. The steps are as follows:


You need to instal a free app called Xcode. It includes command line development tools such as gnu/gcc and friends. See alloca.h-t && \ mv -f alloca.h-t alloca.h .... .. ... gcc -O2 -Wall -o wget cmpt.o connect.o convert.o cookies.o ftp.o css_.o css-url.o ftp-basic.o ftp-ls.o hash.o host.o html-parse.o html-url.o http.o init.o log.o main.o netrc.o progress.o ptimer.o recur.o res.o retr.o spider.o url.o warc.o utils.o exits.o build_info.o version.o ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a -liconv -lssl -lcrypto -lz -ldl -lz -lz Making all in doc ./texi2pod.pl -D VERSION="1.15" ./wget.texi wget.pod /usr/bin/pod2man --center="GNU Wget" --release="GNU Wget 1.14" wget.pod > wget.1 Making all in po Making all in tests make[2]: Nothing to be done for `all'. Making all in util make[2]: Nothing to be done for `all'. make[2]: Nothing to be done for `all-am'.

To install wget, enter:
$ sudo make install

Find out wget location on OS X

By default wget will be installed at the /usr/local/bin/wget. You can use the whereis utility (or type -a) to check the wget location, enter:
$ whereis wget
$ type -a wget
If you do not see output, edit $HOME/.bash_profile or $HOME/.bashrc and add/edit/append PATH as follows:
export PATH=${PATH}:/usr/local/bin
Save and close the file.

How do I use wget command?

The basic syntax is:
wget url
wget http://www.cyberciti.biz/
wget ftp://url/

To see wget version, type:
$ wget --version
Sample outputs:

GNU Wget 1.15 built on darwin13.1.0.
+digest +https +ipv6 -iri +large-file -nls +ntlm +opie +ssl/openssl 
    /usr/local/etc/wgetrc (system)
    gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" 
    -DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib -O2 
    gcc -O2 -Wall -liconv -lssl -lcrypto -ldl -lz ftp-opie.o openssl.o 
    http-ntlm.o ../lib/libgnu.a 
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.

How do I update installed gnu/wget on OS X?

Warning: The following method only works if you installed gnu/wget earlier using source code based method as described above. Do not use the following method if you installed wget using Homebrew or MacPorts.

## Note: wget v1.16 is not released yet! This is a demo for future version ;) ###
$ cd /tmp
$ VERSION="1.16"
$ wget http://ftp.gnu.org/gnu/wget/wget-${VERSION}.tar.gz
$ tar xvf wget-${VERSION}.tar.gz
$ cd wget-${VERSION}
$ ./configure --with-ssl=openssl && make
$ sudo make install
$ wget --version

See also

I recommend the following resources for usage and examples on both wget and curl commands:

And there you have it, gnu/wget installed from directly source code without using 3rd party repos.

Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 12 comments… add one }
  • Johan December 10, 2013, 7:01 am

    Worked like magic on my OSX 10.6.8 ! More PLZ!

    • wakou December 10, 2013, 2:53 pm

      I don’t use a MAC but would like to thank and congratulate the poster on his excellent and comprehensive reply.. Great work!

  • Johan December 11, 2013, 7:39 am

    I was inspired so i looked up something else – today successfully compiled Nmap from source. ( link – nmap.org/download.html#source )
    I also tried mtr, but that failed. May look into it later.

    • Johan December 11, 2013, 7:39 am

      This also on OSX 10.6.8 of course.

  • Deep Sukhwani February 21, 2014, 5:12 pm

    Awesome, thanks so much for helping!…

  • Jason February 27, 2014, 6:57 pm

    Alternatively, one could have Macports (https://www.macports.org/) installed and simply install wget via the CLI:

    sudo port install wget

    Then create a link to wget, and use it from the CLI like on any other posix box:

    sudo ln -s /opt/local/bin/wget /usr/bin/wget
    • Runuply September 2, 2016, 2:40 am

      It came to me with below?
      sudo ln -s /opt/local/bin/wget /usr/bin/wget
      ln: /usr/bin/wget: Operation not permitted
      tkx302:rgtdata ye.liu$

  • john February 28, 2014, 2:46 am

    curl can also resume a partially downloaded file, even on mac os x. I see why you need wget for this…

    just do:
    $ curl -C –

  • Sheharyar March 21, 2014, 11:34 am

    A better way would be to install Homebrew and then install wget through it.

    $ brew install wget
    • Jason March 22, 2014, 8:08 pm

      Why is this way better than any of the others suggested?

  • blue phoenix August 5, 2015, 5:20 pm

    configure: error: in `/Users/blue/wget-1.16.3′:
    configure: error: The pkg-config script could not be found or is too old. Make sure it
    is in your PATH or set the PKG_CONFIG environment variable to the full
    path to pkg-config.

    Alternatively, you may set the environment variables OPENSSL_CFLAGS
    and OPENSSL_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    To get pkg-config, see .
    See `config.log’ for more details
    blue:wget-1.16.3 blue$ make
    There seems to be no Makefile in this directory.
    You must run ./configure before running ‘make’.
    make: *** [abort-due-to-no-makefile] Error 1

    I can’t use make… I even used just ./configure but same result, please help…

    • Jeannie June 25, 2016, 11:53 am

      I have the same issue here, still can’t figure it out how to do this. Any luck with “no Makefile” ?

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , ,