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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何在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

以上是关于如何在Apple OS X 10.5 Leopard上构建和安装GNU wget的主要内容,如果未能解决你的问题,请参考以下文章

如何在Mac OS X 10.5 Leopard中刷新DNS

如何在 Mac OS X 10.5 中处理从 Finder 中的多个文件拖放?

OS X 10.5 malloc 中的错误?

在本地主机(OS X 10.5)上设置通配符域?

OS X 10.5 SDK 已弃用 getAttributeNS;我应该改用啥?

NPM:在 OS X El Capitan 上的“ld: library not found for -lgcc_s.10.5”?