參觀我的【 伊生活小舖】

2014年9月4日 星期四

Install and Configure wget on OS X Mavericks 10.9 and fix SSL GNUTLS error

Get Xcode

To add and install wget to your system you need to download the source files, compile the code and make an install. 
Next you need to install the Xcode command line tools, easiest way to do so by running in the Terminal:
xcode-select --install

Using curl to get wget

Get the latest wget source code from the ftp repository, or using curl from the command line:
cd ~/Downloads
curl -O

Extract it and move into it

tar -zxvf wget-1.14.tar.gz
cd wget-1.14/

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:
./configure --with-ssl=openssl
sudo make install
Thats it done, wget will be installed in:

Clean Up

Remove the source code and compressed file:
rm -rf ~/Downloads/wget*
Test wget
cd ~/Downloads
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,


Ratings and Recommendations by outbrain