linux 安装Apache遇到的奇葩问题

使用Apache2.4.8版本,./configure没有报错,执行make时报错,如下:

make[2]: *** [exports.lo] Error 1

make[2]: Leaving directory `/usr/local/src/httpd-2.4.29/server'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/usr/local/src/httpd-2.4.29/server'

make: *** [all-recursive] Error 1

环境说明:

使用apr版本为1.6.3 ,apr-util版本为1.6.1;已经单独编译安装成功;

编译参数为:

./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre --enable-mods-shared=most --enable-so

 


解决办法:

在configure后加上 “--with-included-apr”。再重新编译, make, make install. 即可。

 


问题又来了,加上--with-included-apr之后,编译,报错如下:

configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.

错误为:apr,apr-util缺失,需要下载并解压到./srclib/目录下

 


解决办法:


# cd /usr/local/src/

# cp -r apr-16.3 /usr/local/src/httpd-2.4.29/srclib/apr

# cp -r apr-util-1.6.1/usr/local/src/httpd-2.4.29/srclib/apr-util

 


再次执行./configure就不会报错,make,make install也不会报错;

posted @ 2017-10-29 23:51  刘haha  阅读(2182)  评论(0编辑  收藏  举报