# 报错信息
[root@centos apr-1.7.0]# ./configure --prefix=/usr/local/apr/apr/
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
Configuring APR library
Platform: x86_64-pc-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.7.0
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/apache/apr-1.7.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[root@centos apr-1.7.0]#
[root@centos apr-1.7.0]# yum -y install gcc
参考链接:https://blog.csdn.net/weixin_33858249/article/details/91574176
checking for windows.h... no
configure: error: Invalid C++ compiler or C++ compiler flags
# yum install -y gcc-c++
参考链接:https://blog.csdn.net/weixin_43930641/article/details/105313937
一、参考链接
阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)
apache镜像-apache下载地址-apache安装教程-阿里巴巴开源镜像站 (aliyun.com)
Apache(Web服务器软件)_百度百科 (baidu.com)
编译安装_Apache中文文档 (apachehttpd.com)
二、Apache 简介
下载地址:https://mirrors.aliyun.com/apache/
三、Apache编译安装(基于CentOS系统)
1、登录CentOS系统
2、安装依赖包
编译安装Apache HTTP Server,目前最新的版本为2.4.52,将apr,apr-util,pcre等相关依赖包编译安装好即可。
若上述安装包已全部安装完成,可以直接进行Apache安装。
🔴 apr安装
下载链接:https://mirrors.aliyun.com/apache/apr/apr-1.7.0.tar.gz
部分安装过程截图如下:
🟡apr-util安装
下载链接:https://mirrors.aliyun.com/apache/apr/apr-util-1.6.1.tar.gz
部分安装过程截图如下:
🟢pcre安装
下载链接:https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz/download
部分安装过程截图如下:
3、Apache安装
下载链接:阿里云开源镜像站资源目录 (aliyun.com)
部分安装过程截图如下:
四、总结与反馈
以上就是编译安装Apache的主要操作步骤,需要注意的是在安装Apache之前,需要安装好相应的依赖包,否则会在安装过程中报错,需要进一步排查。
在安装相应的依赖包的过程中,也会发生一些报错,也需要安装相应的组件,可以将报错信息复制粘贴至网上,搜索查看对应的解决办法。
这里也罗列了几个在安装过程中报错的信息,供大家参考。
报错信息1
报错信息2
报错信息3