Mac OS下安裝wget

alexanderkenndy發表於2016-02-14

       Mac os 下自帶的命令列工具不如linux系統多,如wget,安裝工具yum,apt-get等,今天在安裝軟體的時候就發現居然沒有wget,雖然可以使用curl -O 來替代,但是習慣了使用wget的我,還是想安裝一下,下面就給大家介紹mac下安裝wget的方法

1.下載wget

curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
2.解壓
tar -xzvf wget-1.13.4.tar.gz
cd wget-1.13.4
3.編譯安裝
./configure --with-ssl=openssl
make
sudo make install
4.注意事項
如果在執行./configure的時候沒有輸入--with-ssl=openssl引數,則可能會遇到如下錯誤
...
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.
參考國外的專家:
https://thomashunter.name/blog/install-wget-on-os-x-lion/

相關文章