如何在Apple OS X 10.5 Leopard上构建和安装GNU wget

【如何在Apple OS X 10.5 Leopard上构建和安装GNU wget】幼敏悟过人,读书辄成诵。这篇文章主要讲述如何在Apple OS X 10.5 Leopard上构建和安装GNU wget相关的知识,希望能为你提供帮助。
**Download**1. Download the latest source code from the [GNU wget website](http://www.gnu.org/software/wget/ " GNU wget website" ). You can download the latest version from [this link](http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz " Latest wget version" ).2. Extract the downloaded archive to a directory of your choice. For this example, we will extract to a directory on the desktop.**Configure**1. Once extracted, open up the terminal, and `cd` into the directory where you extracted the wget source code. Adjust the example below accordingly. `cd /Users/admin/Desktop/wget-1.11.4/`2. Before compiling, we must configure the source code for our system by running the configure script that is included with the source code. The configure script lets us specify options on how we want to build the program. For example, we can control where to install the program. By default, wget will install into `/usr/local/bin`. If we wish to change the install location, we can run the configure script with the `--prefix=/path/to/install/location` flag. In the example below, we will install all the wget files in its own directory (/usr/local/wget). **If you want to install wget into the default location (`/usr/local/bin`), *omit* the `--prefix=/usr/local/wget` when running the command below.** `./configure --prefix=/usr/local/wget`**Compiling and Installing**1. Once the configure script is done, type in `make` to start building the wget binaries. It will take several seconds to compile wget depending on the speed of your system. Once the compilation is complete, install the binaries (as root) by typing in `sudo make install`. `make` `sudo make install`2. If you used the default installation path, restart your terminal session and type in `wget` to run the program.3. If you used the location in our example, you must use the full path to the binary: `/usr/local/wget/bin/wget http://www.example.com` * To use `wget` instead of the full path, you can add wget to your `.profile` path, or add it system-wide by editing `/etc/paths`. `sudo nano /etc/paths` * Add `/usr/local/wget/bin` to the end of the file as shown. When done, press CTRL+X, answer " y" to save the changes, and press RETURN to update the file. Restart your terminal session to reload the paths. `/usr/bin` `/bin` `/usr/sbin` `/sbin` `/usr/local/bin` `/usr/local/wget/bin`

  1. cd /Users/admin/Desktop/wget-1.11.4/
  2.  
  3. ./configure
  4.  
  5. make
  6.  
  7. sudo make install


    推荐阅读