linux 安装apache 错误:configure: error: /bin/sh build/config.sub failed解决办法

45 篇文章 0 订阅
[root@servers httpd-2.2.27]# --enable-expires \
> --enable-headers \
> --enable-modules=most \
> --enable-so \
> --with-mpm=worker \
> --enable-rewrite
-bash: --enable-expires: command not found
[root@servers httpd-2.2.27]# ./configure \
> --prefix=/application/appache2.2.27 \
> --enable-deflate \ 
--enable-expires \
--enable-headers \
--enable-modules=most \
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:  
--enable-so \
--with-mpm=worker \
--enable-rewritechecking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... config.sub: missing argument
Try `config.sub --help' for more information.
configure: error: /bin/sh build/config.sub   failed

[root@servers httpd-2.2.27]# --enable-expires \

首先保留犯罪现场



第一次遇到这个问题 实在无奈,唉!奈何小白一个自学,太苦难,首先谢谢白菜在深夜的解答!这个问题在百度跟谷歌基本无解;我找遍了是没找到问题解决办法

最后在瞎搞中完成这项光荣任务,感谢党感谢国家!

./configure \
--prefix=/application/apache2.2.27 \
--enable-deflate \
--enable-expires \
--enable-headers \
--enable-modules=most \
--enable-so \
--with-mpm=worker \
--enable-rewrite \


错误:如下

configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:  
--enable-so \
--with-mpm=worker \
--enable-rewritechecking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... config.sub: missing argument
Try `config.sub --help' for more information.
configure: error: /bin/sh build/config.sub   failed

然后我再去执行/bin/sh ./include/config.sub  结果错误是这样子的:

[root@servers httpd-2.2.27]# /bin/sh config.sub 
config.sub: missing argument
Try `config.sub --help' for more information.

提示参数不够,然后通过小白菜哥哥的提示,试试去掉所有参数  再进行环境检查:发现万事OK!没问题!!!

然后可以确定问题在参数方面,然后我开始一个个去掉参数:发现问题出现在--enable-deflate \这个上面,故这个有问题。

最后对调参数:用如下测试:参数放在倒数第二个再次环境测试!结果发现通过了!,其实问题出现在\后面有空格,去掉空格再编译

./configure \
--prefix=/application/apache2.2.27 \
--enable-expires \
--enable-headers \
--enable-modules=most \
--enable-so \
--with-mpm=worker \
--enable-deflate \
--enable-rewrite \


至此问题得以解决!



  • 8
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值