linux安装源码包出现apr错误,LinuX安装apache遇到坑的处理方案

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

解压依赖包

第一步? cd? tar目录 (没有自己建立一个tar目录)

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写<>有效

摘录如下:

48cf32d595c95728ce4d4ef0023b55ed.png

地址如下:

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

如图所示:

05867891c6b0ce8ee55ef0cf092af15b.png

1e98b4825d69581f8b4c4f4c8bbe23d9.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值