Mac Lion安装wget工具

上次我们提到了在Mac下安装gcc,今天来安装一个经常在命令行下使用的工具Wget。

Wget是一个支持HTTP、FTP的下载工具,经过合理的配置参数,我们甚至可以将一个网站的内容全部拷贝下来。

笔者的系统是Mac OS Lion 10.7.4 ,安装好了gcc,如果没有安装gcc的同学,需要下载Xcode,然后通过下载命令行工具来进行安装。

下载Wget的源代码:下载地址

直接安装的话,会发生下面的错误。

checking for compress in -lz... yes
checking for gpg_err_init in -lgpg-error... no
checking for gcry_control in -lgcrypt... no
checking for libgnutls... no
configure: error: --with-ssl was given, but GNUTLS is not available.
username@host:~/wget-1.13.4 $

zioer的站中也给出了一个解决方法,但这里我找到了一个更好的办法。

#  tar zxvf wget-1.13.4.tar.gz
# cd wget-1.13.4
wget-1.13.4 root# ./configure  --with-ssl=openssl
wget-1.13.4 root# make
wget-1.13.4 root# make install

注意,你如果不是使用root用户,那么在安装的这一步需要使用sudo授权。 

 

参考资料:
1、MAC OS安装Wget
2、Install Wget On OS X Lion
3、Discussion about the Nettle crypto library ()

posted @ 2012-06-24 22:48  Cocowool  阅读(9554)  评论(0编辑  收藏  举报