How to install wget on Mac ( OS X El Capitan )

How to install wget on Mac OSX El Capitan? Here is a guide in 33 simple steps for absolute beginners 🙂

  1. cd ~/Downloads
  2. xcode-select –install
  3. mkdir wget
  4. cd wget
  5. curl -o
  6. curl -O
  7. wget -zxvf wget-1.17.tar.gz 
  8. tar -zxvf wget-1.17.tar.gz
  9. cd wget-1.17
  10.  ./configure,
    or you would better run
    ./configure –with-ssl=openssl
    the script(s) might failure if you do not have pkg already installed and if that is the case pls continue with the steps below, otherwise move to step 22

    ## pkg install
  11. cd ~/Downloads
  12. mkdir pkg
  13. cd pkg
  14. curl -O
  15. tar -zxvf pkg-config-0.29.tar.gz 
  16. cd pkg-config-0.29
  17. ./configure
    the script might failure , if this is the case pls re-run it like in step 18 below
  18. env LDFLAGS=”-framework CoreFoundation -framework Carbon” ./configure –with-internal-glib
  19. sudo make install
    at this step you finished the installation of pkg, so you should retry to configure wget again## retry wget build
  20. cd ~/Downloads/wget/wget-1.17
  21. ./configure –with-ssl=openssl(at this step on some system the ./configure script might notive that you do not have the env variable PKG_CONFIG_PATH set; if that is the case pls run this first:
    export PKG_CONFIG_PATH=/usr/lib/pkgconfig
    and now you can repeat the step 21
  22. make
    at this step there are high chances that your build will fail because the complier cannot find the header files of openssl, if that is the case pls continue with the lines below, otherwise just go to step 32

    ## openssl download and make it visibile to wget compiler
  23. cd ~/Downloads/
  24. mkdir openssl
  25. cd openssl/
  26. curl -O
  27. tar -zxvf openssl-0.9.8zg.tar.gz
    at this step in the folder openssl-0.9.8zg you will have the source code of openssl, so we need a way to expose the location of the header files (.h) to the process that will compile wget; one way to do this is to create a symlink  like below
  28. ln -s ~/Downloads/openssl/openssl-0.9.8zg/include/openssl/ ~/Downloads/wget/wget-1.17/src
  29. ln -s ~/Downloads/openssl/openssl-0.9.8zg/crypto/ ~/Downloads/wget/wget-1.17/src
    at this step you are finally able to retry the build process for wget
  30. cd ~/Downloads/wget/wget-1.17
  31. make

    ## install wget
  32. sudo make install
  33. wget – -version
    so we just tested everything goes well and you are able to use wget on OS X

Enjoy !






  1. cdman83 said

    Never used OS X (I prefer Linux :-)) but I seem to recall that there is some kind of package manager for it called “homebrew” which should reduce these 33 steps to 2 🙂

    • that is correct. but there are reasons sometimes people don’t want to use homebrew , macports and other package managers for osx.
      second, someone needs to know how to install homebrew 🙂 that is again a process (not that big, true), incl doctor etc :).

      but good catch thank you ! someone that already has homebrew installed will definitely use that one to install wget.

    • THANK YOU for homebrew!!! It’s awesome

  2. You are amazing. Unfortunately, my mac doesn’t allow me to upgrade / install the latest version of wget. I was able to install version 1.16.3 without much hassle. Now, the latest version 1.17.1 doesn’t budge. Tried all the above guidelines. Still struct at the error regarding openssl. Anyway, I wanted to thank you for your contribution towards a possible solution. I am happy with wget 1.16.3 for now. 🙂

    • what if you go with the easy way (assuming you are allowed to install homebrews) that is:
      – install homebrew package manager from
      – simply do a… brew install wget

      • Thanks. That’s an easier way. It’s my own mba. So, no problem installing brew or mac ports.

  3. chris said

    thank you for this. who would have thought wget would be so much work to install.

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: