This is what I had to do to compile it on my Macbook Pro;
- Install Xcode, if you haven’t, and be sure to select UNIX Dev Support.
Or you’ll get this error:
configure: error: C compiler cannot create executables
- Export Xcode’s gcc PATH:
- Download wget
- In Terminal: untar it
tar xvzf wget-latest.*
- And compile it
cd wget directory ./configure make sudo make install
- In case you had an old (precompiled) wget installed;
remove that version first (/usr/bin/wget probably).
By default, this one will install itself in /usr/local/bin/wget which should be in your $PATH as well (in case it’s not, make a symlink from the old /usr/bin/wget to /usr/local/bin/wget, or recompile with other installation directories).