Centos安装Apache的问题
安装Apache时需要先安装apr, 我下载了1.4.6版本,make的时候出现错误:
make[1]: Entering directory `/home/data/apr-1.4.6'
/bin/sh /home/data/apr-1.4.6/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I./include -I/home/data/apr-1.4.6/include/arch/unix -I./include/arch/unix -I/home/data/apr-1.4.6/include/arch/unix -I/home/data/apr-1.4.6/include -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo
/home/data/apr-1.4.6/libtool: line 854: X--mode=compile: command not found
/home/data/apr-1.4.6/libtool: line 1020: *** Warning: inferring the mode of operation is deprecated.: command not found
/home/data/apr-1.4.6/libtool: line 1021: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
/home/data/apr-1.4.6/libtool: line 1164: Xgcc: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-g: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-O2: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-pthread: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-DHAVE_CONFIG_H: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-DLINUX=2: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-D_REENTRANT: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-D_GNU_SOURCE: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-D_LARGEFILE64_SOURCE: command not found
/home/data/apr-1.4.6/libtool: line 1164: X-I./include: No such file or directory
/home/data/apr-1.4.6/libtool: line 1164: X-I/home/data/apr-1.4.6/include/arch/unix: No such file or directory
/home/data/apr-1.4.6/libtool: line 1164: X-I./include/arch/unix: No such file or directory
/home/data/apr-1.4.6/libtool: line 1164: X-I/home/data/apr-1.4.6/include/arch/unix: No such file or directory
/home/data/apr-1.4.6/libtool: line 1164: X-I/home/data/apr-1.4.6/include: No such file or directory
/home/data/apr-1.4.6/libtool: line 1164: X-c: command not found
/home/data/apr-1.4.6/libtool: line 1216: Xpasswd/apr_getpass.lo: No such file or directory
/home/data/apr-1.4.6/libtool: line 1221: libtool: compile: cannot determine name of library object from `': command not found
make[1]: *** [passwd/apr_getpass.lo] Error 1
make[1]: Leaving directory `/home/data/apr-1.4.6'
make: *** [all-recursive] Error 1
google之后发现有些人是说libtool的版本问题, 于是卸载掉旧的libtool 1.5, 装一个2.4.2版本,结果./configure的时候出现这样的问题:
checking whether accepts -g... no
checking for gccgo... no
checking for gcj... no
checking for windres... no
checking whether make supports order-only prerequisites... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
各位大虾,如何安装apr
[解决办法]
apr-1.4.6.tar.gz和apr-util-1.4.1.tar.gz都要有,看看Apaache官网安装说明,链接:http://httpd.apache.org/docs/2.4/install.html
Make sure you have APR and APR-Util already installed on your system.
If you don't, or prefer to not use the system-provided versions,
download the latest versions of both APR and APR-Util from Apache APR,
unpack them into ./srclib/apr and ./srclib/apr-util
(be sure the domain names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/)
and use ./configure's --with-included-apr option.
On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.