1.ftp://ftp.gnu.org/gnu/wget/官网下载最新的安装包 wget-1.19.tar.gz
2.打开终端输入 tar zxvf wget-1.9.1.tar.gz 解压缩
3.进入wget所在文件夹 终端输入cd wget-1.9.1
4.终端输入 ./configure
如果出现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.
终端输入 ./configure --with-ssl=openssl ,
如果你是OS X 10.10+ and OS X 10.11+,建议输入./configure --with-ssl=openssl --with-libssl-prefix=/usr/local/ssl,否则会报错configure: error: –with-ssl=openssl was given, but SSL is not available,如果按照上面步步骤还是报错,有可能是安装包放置的位置不对,建议放在 usr/local/Cellar/wget-1.9.1,我是这样解决的报错 安装成功的
6.make
7.sudo make install
8.可以输入wget www.google.com 看看是否安装成功