update: 2012/03/17
A. 說明
Wget 是一個很方便可以在終端機模式下下載檔案的工具, 由於 Mac 預設並沒有
安裝 wget, 想要在 Mac 上編譯安裝 wget, 需要有 C/C++ 的編譯器, 如果已經有安裝
Xcode 的話, 就已經具備可以編譯並安裝 wget 的環境了.
(特別是當網路頻寬不穩定時, 可以自動重新下載並續傳)
B. 下載 wget 原始碼
網址: http://www.gnu.org/software/wget/
最新版本: wget-1.13.tar.gz
C. 編譯與安裝
解壓縮原始檔後, 到其目錄下, 開啓終端機執行以下的指令:
$ cd /Lanli/RD/source/wget-1.13
// configure the packages and files for your computer
$ ./configure
說明: 配置失敗:
configure: error: --with-ssl was given, but GNUTLS is not available.
解決方式: 1. 不使用 SSL, 重新配置: $ ./configure --without-ssl
2. 先安裝 GNUTLS, 再執行配置(可能還要安裝一堆相關的套件)
這邊採用重新配置:
$ ./configure --without-ssl
// make the files into a single binary file for use on your computer
$ make
// copy the binary file into the correct location on your computer
$
sudo make install
D. 下載測試
$ wget www.raywenderlich.com/downloads/HorizontalTableResources.zip
--2012-03-17 11:16:32-- http://www.raywenderlich.com/downloads/HorizontalTableResources.zip
Resolving www.raywenderlich.com... 74.207.227.16
Connecting to www.raywenderlich.com|74.207.227.16|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4224674 (4.0M) [application/zip]
Saving to: `HorizontalTableResources.zip'
10% [=======> ] 434,696 7.08K/s in 38s
2012-03-17 11:17:12 (11.1 KB/s) - Connection closed at byte 434696. Retrying.
--2012-03-17 11:17:14-- (try: 2) http://www.raywenderlich.com/downloads/HorizontalTableResources.zip
Connecting to www.raywenderlich.com|74.207.227.16|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 4224674 (4.0M), 3789978 (3.6M) remaining [application/zip]
Saving to: `HorizontalTableResources.zip'
....
100%[+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++==>] 4,224,674 10.9K/s in 12s
2012-03-17 11:23:51 (10.9 KB/s) - `HorizontalTableResources.zip' saved [4224674/4224674]
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。