Mac OS 安装Wget

没有Wget的日子是非常难过的,强大的Mac OS 下安装Wget非常简单

下载一个Wget的源码包,http://www.gnu.org/software/wget/

安装与配置

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

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

2. 进入到解压的目录

tar zxvf wget-1.9.1.tar.gz

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
上一篇:「工具」三分钟了解一款在线流程绘制工具:Whimsical


下一篇:Spring框架知识整理