Apache2.4.7 make报错[exports.lo] Error 1 解决方法


编写LAMP一键安装脚本,使用Apache2.4.7版本,./configure没有报错,执行make时报错,如下:

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

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

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

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

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

环境说明:

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

编译参数为:

./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-1.5.2 /usr/local/src/httpd-2.4.7/srclib/apr

# cp -r apr-util-1.5.4 /usr/local/src/httpd-2.4.7/srclib/apr-util

 


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

下面关于LAMP相关的内容你可能也喜欢:

LAMP平台安装Xcache和Memcached加速网站运行   

CentOS 7下搭建LAMP平台环境 

CentOS 6.5系统安装配置LAMP(Apache+PHP5+MySQL)服务器环境

Ubuntu 14.04 配置 LAMP+phpMyAdmin PHP(5.5.9)开发环境 

Ubuntu 14.10 下安装 LAMP 服务图文详解 

LAMP结合NFS构建小型博客站点 

本文永久更新链接地址

相关内容