apache安装错误error: APR not found解决办法:
这里摘录百度经验《apache安装错误error: APR not found解决办法》地址如下:
https://jingyan.baidu.com/article/4b07be3c5cd75348b380f3c3.html
下载依赖包
http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
解压依赖包
tar -xzvf apr-1.4.5.tar.gz
tar -xzvf apr-util-1.3.12.tar.gz
tar -xzvf pcre-8.10.zip(这种方法是错误的,所以我在网上找一些资料)
参见博客园蔷薇Nina《Apache Linux下Apache安装步骤》地址如下:
https://www.cnblogs.com/wcwnina/p/8029156.html
解决方法摘录如下:
[root@getlnx05 kerry]# unzip pcre-8.33.zip
[root@getlnx05 kerry]# cd pcre-8.33
[root@getlnx05 pcre-8.33]# mkdir /usr/local/pcre
[root@getlnx05 pcre-8.33]# ./configure --prefix=/usr/local/pcre --with-apr=/usr/local/apr/bin/apr-1-config
但这里我想给各位提个醒,先安装yum是一个不错的解决方案
摘录cndn的拥春飞翔《linux下yum安装的最简方法》方法如下:
下载最新的yum-3.2.28.tar.gz并解压
1)wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz
tar xvf yum-3.2.28.tar.gz
2)运行安装
touch/etc/ yum.conf
cd yum-3.2.28
yummain.py install yum
解决g++方案如下
参见博客园蔷薇Nina《Apache Linux下Apache安装步骤》地址如下:
https://www.cnblogs.com/wcwnina/p/8029156.html
Apache安装过程
Step 1:安装包gcc或gcc-c++
[root@getlnx05 pcre-8.33]# yum list gcc-c++
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Available Packages
gcc-c++.x86_644.1.2-51.el5 rhel-debuginfo
[root@getlnx05 pcre-8.33]# yum list gcc
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Installed Packages
gcc.x86_64 4.1.2-51.el5 installed
[root@getlnx05 pcre-8.33]# rpm -q gcc
gcc-4.1.2-51.el5
从上面可见gcc包已经安装,缺少gcc-c++包,那么接下来安装包gcc-c++,如果此处不安装该包,后面安装过程中会报错。(编译C)
[root@getlnx05 pcre-8.33]#yum install gcc-c++
解决libtool问题
二、 libtool编译
1. 网站上下载libtool的源码包
2. 解压源码包之后,进入包目录,执行以下命令
./configure --prefix=/home/lizj/0002_linux/libtool/libtool_install # 该路径依据你自己的系统设置
make &&make install
问题4:安装前忘了先安装APR相关包
[root@getlnx05 httpd-2.4.6]# ./configure --prefix=/usr/local/appache/
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... no
configure: error: APR not found. Please read the documentation.
[root@getlnx05 httpd-2.4.6]#
这里没有提出解决方案:
我查cndn中nange_nice写<<安装apr-util 执行make命令时报错的解决方法>>有效
摘录如下:
地址如下:
https://blog.csdn.net/nange_nice/article/details/75785189
但还需要最后一步,来自yzkwork《Centos安装 Apache2.4提示 APR not found的解决办法》方法
https://www.cnblogs.com/yuzhaokai0523/p/4382974.html
摘录如下:
2.最后编译Apache时加上:--with-apr=/usr/local/apr \--with-apr-util=/usr/local/apr-util/ \--with-pcre=/usr/local/pcre
./configure --prefix=/usr/local/apache2.4--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
如图所示: