Mac安装wget

Mac安装wget


wget版本: wget-1.17

参考来源:

Mac OS 安装Wget

給Mac添加wget功能

The Wget package for Mac

http://brew.sh/

安装与配置

1. 首先下载一个Wget的源码包

http://www.gnu.org/software/wget/

2. 进入到解压的目录

3. 输入:./configure

末尾几行执行结果:

...
configure: error: in `/Users/Richard/Documents/Dev/tools/wget-1.17':
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 GNUTLS_CFLAGS
and GNUTLS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details

为解决此问题

1)在命令行运行
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2)安装中会有提示
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/doc
Password:

直接回车

3)安装完毕
...
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at b3139f3 test-bot: allow tapuser/taprepo/tapformula format.
==> Installation successful!
==> Next steps
Run `brew help` to get started      
4)安装wget
$ brew install wget
5)安装结束
...
==> Summary
?  /usr/local/Cellar/openssl/1.0.2e: 465 files, 17M
==> Installing wget
==> Downloading https://homebrew.bintray.com/bottles/wget-1.17.yosemite.bottle.1    
######################################################################## 100.0%
==> Pouring wget-1.17.yosemite.bottle.1.tar.gz
?  /usr/local/Cellar/wget/1.17: 9 files, 1.6M   

如果使用brew安装wget,以下4、5可以略去。

4. 输入:make

5. 输入:sudo make install

有图有真相
613455-20151212132034200-255834237.png

结束

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值