依赖的文件列表
先编译依赖库:
1.编译gmp-6.0.0a.tar.bz2
./configure
make && make install
2.编译 nettle-2.7.1.tar
tar xvf nettle-2.7.1.tar
cd nettle-2.7.1
./configure --enable-shared (需要加上此选项,否则只会编译出静态库)
make && make install
#编译出的两个so文件:libnettle.so.4.7和libhogweed.so.2.5
#nettle默认的安装路径是/usr/local/lib64/,我这个fadora18中,默认的库路径中没有,所以,可以把这个路径加入到ld的寻找路径,或者是,做一个链接,将libnettle.so.4.7和libhogweed.so.2.5 链接到可加载到路径
ln -s /usr/local/lib64/libnettle.so.4.7 /usr/local/lib/libnettle.so.4
ln -s /usr/local/lib64/libhogweed.so.2.5 /usr/local/lib/libhogweed.so.2
3. 编译 gnutls-3.3.18.tar.xz
cd gnutls-3.3.18
./configure
make && make install
4. 编译wget
cd wget-1.16
./configure
make && make install
5. 执行wget
中间可能遇到的问题
如果没有编译好安装nettle,或者是没有配置好ld的路径,编译gnutls时会出现下面错误
configure: error:
***
*** Libnettle 2.7.1 was not found.
export LD_LIBRARY_PATH=/usr/lib/:/usr/lib64/:/opt/lib/:/opt/lib64/ NETTLE_CFLAGS="-I/opt/include/" NETTLE_LIBS="-L/opt/lib64/ -lnettle" HOGWEED_CFLAGS="-I/opt/include" HOGWEED_LIBS="-L/opt/lib64/ -lhogweed” && ./configure