关于apache2.4.34源码包安装遇到的问题解决方法

在 配置 ./configure --prefix=/usr/local/apache 出现以下错误

报错1:

checking for gcc… no checking for cc… no checking for cl.exe… no configure: error: in

安装gcc :yum install -y gcc

报错2:

pcre报错 checking for pcre-config… false

解决办法: yum install pcre pcre-devel

报错3:

checking for APR… no configure: error: APR not found. Please read the documentation

下载apr:wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz

tar -zxvf apr-1.6.3.tar.gz

cp -r apr-1.6.3 /usr/local/src/httpd-2.4.34/srclib/apr

cd apr-1.6.3

./configure --prefix=/usr/local/apr

make && make install

报错3.1:
checking for APR-util… no configure: error: APR-util not found. Please read the documentation

wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz

tar -zxvf apr-util-1.6.1.tar.gz

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

cd apr-util-1.6.1

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make

make install

在编译apr-util 可能也会报错xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory

yum install expat-devel安装该库,安装完再次编译

然后重新配置apache 并编译安装:

cd httpd-2.4.34

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

make

make install

补充:
make[1]: 离开目录“/usr/local/src/httpd-2.4.34/support”
make: *** [all-recursive] 错误 1

解决办法: make clean 然后重新./configure make

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值