红联Linux门户
Linux帮助

configure: error: /bin/sh build/config.sub failed解决办法

发布时间:2016-07-14 10:32:23来源:linux网站作者:小郑郑要飞飞
linux安装apache错误:configure: error: /bin/sh build/config.sub failed的解决办法。
[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: error: /bin/sh build/config.sub failed解决办法
 
第一次遇到这个问题,实在无奈,找遍了是没找到问题解决办法。
 
最后动手解决如下:
./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 \
 
至此问题得以解决!
configure: error: /bin/sh build/config.sub failed解决办法
 
本文永久更新地址:http://www.linuxdiyf.com/linux/22364.html