ubuntu编译安装httpd make时报错,百度上各种答案都已试过不行,求大神帮忙看看?

/bin/bash: tools/gen_test_char: cannot execute binary file: Exec format errorMakefile:141: recipe for target 'include/private/apr_escape_test_char.h' failedmake[3]: * [include/private/apr_escape_test_char.h] Error 126make[3]: * Waiting for unfinished...显示全部

/bin/bash: tools/gen_test_char: cannot execute binary file: Exec format error
Makefile:141: recipe for target 'include/private/apr_escape_test_char.h' failed
make[3]: * [include/private/apr_escape_test_char.h] Error 126
make[3]: * Waiting for unfinished jobs....
make[3]: Leaving directory '/opt/src/httpd-2.4.39/srclib/apr'
/opt/src/httpd-2.4.39/srclib/apr/build/apr_rules.mk:118: recipe for target 'all-recursive' failed
make[2]: * [all-recursive] Error 1
make[2]: Leaving directory '/opt/src/httpd-2.4.39/srclib/apr'
/opt/src/httpd-2.4.39/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory '/opt/src/httpd-2.4.39/srclib'
/opt/src/httpd-2.4.39/build/rules.mk:75: recipe for target 'all-recursive' failed
make: * [all-recursive] Error 1

收起
参与12

查看其它 3 个回答hbhe0316的回答

hbhe0316hbhe0316数据库管理员IBM

下面是我的一个安装步骤:
3.5. 安装apache步骤
3.5.1. 安装pcre-8.38
[root@apache apache]# tar xvf pcre-8.38.tar.gz
[root@apache apache]# cd pcre-8.38/
[root@apache pcre-8.38]# ./configure --prefix=/apache/pcre-8.38
[root@apache pcre-8.38]# make && make install
3.5.2. 安装expat
[root@apache apache]# tar xvf expat_2.0.1.orig.tar.gz
[root@apache apache]# cd expat-2.0.1/
[root@apache expat-2.0.1]# ./configure --prefix=/apache/expat
[root@apache expat-2.0.1]# make && make install
3.5.3. 安装apr
[root@apache apache]# tar xvf apr-1.7.0.tar.gz
[root@apache apache]# cd apr-1.7.0/
[root@apache apr-1.7.0]# ./configure --prefix=/apache/apr
[root@apache apr-1.7.0]# make && make install
3.5.4. 安装apr-util
[root@apache apache]# tar xvf apr-util-1.6.1.tar.gz
[root@apache apache]# cd apr-util-1.6.1/
[root@apache apr-util-1.6.1]# ./configure --prefix=/apache/apr-util --with-apr=/apache/apr/bin/apr-1-config --with-expat=/apache/expat
[root@apache apr-util-1.6.1]# make && make install

3.5.5. 安装httpd 2.4.39
[root@apache apache]# tar xvf httpd-2.4.39.tar.gz
[root@apache apache]# cd httpd-2.4.39/
[root@apache httpd-2.4.39]# ./configure --prefix=/apache --with-apr=/apache/apr --with-apr-util=/apache/apr-util --with-pcre=/apache/pcre-8.38
[root@apache httpd-2.4.39]# make && make install
3.6. 安装后验证
使用root用户登陆,将/apache目录设置为apache用户所有。
[root@apache /]# chown -R apache:apache /apache/
修改/apache/conf/httpd.conf文件
将Listen 80修改成大于1024的端口号,以便非root用户可以使用,如下,我将80端口修改成8080
[root@apache conf]# cat httpd.conf | grep 8080
Listen 8080
启动apache
[root@apache conf]# /apache/bin/apachectl start
[root@apache conf]# netstat -an | grep 8080
tcp6 0 0 :::8080 :::* LISTEN

相关软件包下载:
链接:https://pan.baidu.com/s/1G8Xl4iIZLFFQaTRX1XC7Ng
提取码:753x

IT分销/经销 · 2019-07-21
浏览3186

回答者

hbhe0316
数据库管理员IBM
擅长领域: 服务器数据库中间件

hbhe0316 最近回答过的问题

回答状态

  • 发布时间:2019-07-21
  • 关注会员:5 人
  • 回答浏览:3186
  • X社区推广