MAC 安装wget --with-ssl=openssl

原文:https://thomashunter.name/blog/install-wget-on-os-x-lion/


安装前需确认已经安装XCODE,  XCODE 可以在 app store 上免费下载安装。
然后在命令行中运行如下命令,分别是下载,解压,配置编译环境,编译和编译安装。
最主要是的在./configure 的时候带上带上--with-ssl=openssl, 否则会报错,说ssl没有安装,默认使用GNUTUIL 中的ssl。我就是这里安装不上搜到了本文。

Run the following commands in a terminal window to compile wget on OS X Lion:

curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
tar -xzvf wget-1.13.4.tar.gz
cd wget-1.13.4
./configure --with-ssl=openssl
make
sudo make install
which wget #Should output: /usr/local/bin/wget


Install wget on OS X Lion

2011/11/05

A pre-requisite for this to work is that you have the second disc of utilities that came with your Mac installed. This disc will provide a bunch of utilities required to compile code. Alternatively, you can Install Xcode from the App Store (it’s free!) and you will get all of the same utilities.

UPDATE: Installing Xcode is no longer good enough.You will now need to open Xcode, go to preferences (Cmd + ,), go to Downloads, and install the Command Line Tools feature. This installs a bunch of development tools onto your system.

Run the following commands in a terminal window to compile wget on OS X Lion:

curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
tar -xzvf wget-1.13.4.tar.gz
cd wget-1.13.4
./configure --with-ssl=openssl
make
sudo make install
which wget #Should output: /usr/local/bin/wget

Note the with-ssl=openssl option in the command above. If you omit that, you will get the following error:

...
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 $

The reason for this is that GNUTLS isn’t included with Mac OS X, but the equally usable library OpenSSL is available.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值