#./configure --prefix……检查编辑环境时出现:

checking for APR... no configure: error: APR not found .  Please read the documentation.

可以用./configure –help | grep apr 查看帮助。 --with-included-apr     Use bundled copies of APR/APR-Util --with-apr=PATH         prefix for installed APR or the full path to apr-config --with-apr-util=PATH    prefix for installed APU or the full path to 安装APR(Apache Portable Runtime ) 下载:http://apr.apache.org/download.cgi

#cd /tmp/52lamp/ //源码存放位置 #tar -zxvf apr-1.4.2.tar.gz //unzip -o apr-1.4.2.zip #cd apr-1.4.2 #./configure #make #make install

再次检查编译环境出现

checking for APR-util... no configure: error: APR-util not found .  Please read the documentation.

#./configure –help | grep apr-util --with-apr-util=PATH    prefix for installed APU or the full path to

下载:http://download.chinaunix.net/download/0001000/472.shtml #tar -zxvf apr-util-1.3.9.tar.gz #cd apr-util-1.3.9 #./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr #make #make install

./configure仍提示APR-util not found,增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util后出现 configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

#./configure –help | grep pcre --with-pcre=PATH        Use external PCRE library

下载:http://sourceforge.net/projects/pcre #unzip -o pcre-8.10.zip #cd pcre-8.10 #./configure --prefix=/usr/local/pcre #make #make install

继续安装Apache/httpd,./configure 时加上参数 --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre,这个问题就解决了

注意:Apache在安装时不会检查参数是否正确,错误的参数会直接被丢弃,不会报告给用户。但可以使用echo $?命令检查是否有错误,当输出结果为0时表示没有错误。

#echo $? 0

#make #make install

复制Apache启动文件 #cp /usr/local/httpd/bin/apachectl /sbin/

启动Apache #apachectl start

设置Apache开机自启动 #vi /etc/rc.d/rc.local 增加一行 /sbin/apachectl start

或者将httpd服务添加到ntsysv服务管理工具 #apachectl stop //关闭Apache以免不必要的麻烦 #cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/httpd #vi /etc/rc.d/init.d/httpd 修改为 #!/bin/sh # #chkconfig: 345 85 15 //#不能省略,注意空格 #description: httpd for 52lamp 20101016 21:54 //任意字符串 # ......

第二行中345的含义: #       0 - operation completed successfully #       1 - #       2 - usage error #       3 - httpd could not be started #       4 - httpd could not be stopped #       5 - httpd could not be started during a restart

修改有关权限 #cd /etc/rc.d/init.d/ #chmod a+x httpd #chkconfig --add httpd

#ntsysv httpd已经在列表中,按F1可以看到刚才编写的服务描述httpd for 52lamp 20101016 21:54。

#apachectl start #ps -e |grep httpd 23247 ?        00:00:00 httpd 23248 ?        00:00:00 httpd 23249 ?        00:00:00 httpd 23251 ?        00:00:00 httpd 23252 ?        00:00:00 httpd

在浏览器中输入127.0.0.1,看起来一切正常;但是局域网内其他电脑不能访问!

#service iptables stop

如果不想关闭防火墙,放开80端口即可。

#vi /etc/sysconfig/iptables 增加一行-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT #service iptables restart //重启防火墙

现在一切OK

Apache遇到的问题:APR not found的更多相关文章

  1. apache安装错误error: APR not found解决办法

    linux安装时安装种类不同,一些组件包可能不会被安装,导致linux下安装软件的时候缺这个缺那个,今天为大家介绍linux安装apache时报apr找不到的解决办法 方法/步骤   下载依赖包 wg ...

  2. Apache安装编译遇到APR的问题

    http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.27.tar.bz2Apache下载链接 在解压Apache源码包进入目录运行 ...

  3. Tomcat 8.5 基于 Apache Portable Runtime(APR)库性能优化

    Tomcat可以使用Apache Portable Runtime来提供卓越的性能及可扩展性,更好地与本地服务器技术的集成.Apache Portable Runtime是一个高度可移植的库,位于Ap ...

  4. linux 上安装apache 出现 configure: error: APR not found. Please read the documentation错误

    今日编译apache时出错: #./configure --prefix……检查编辑环境时出现: checking for APR... noconfigure: error: APR not fou ...

  5. Apache模块开发指南-APR池

    转:原文: http://blog.csdn.net/zmxiangde_88/article/details/8038150 ------------------------------------ ...

  6. Apache安装问题:APR not found

    资料来源:Apache遇到的问题:APR not found 安装apache时出现arp错误问题 按照以上文章试验之后整理如下: #./configure --prefix……检查编辑环境时出现: ...

  7. The APR based Apache Tomcat Native library 异常解决办法

    tomat在linux服务器上启动报The APR based Apache Tomcat Native library which allows optimal performance in pro ...

  8. apache apr介绍

    APR(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库.在早 ...

  9. CentOS 安装apache 及所需的 apr,apr-util,pcre

    安装apache前确定已安装 apr,apr-util,pcre 一.安装apr [root@xt test]# tar -zxf apr-1.4.5.tar.gz [root@xt test]# c ...

  10. The APR based Apache Tomcat Native library tomcat启动错误

    The APR based Apache Tomcat Native library which allows optimal performance in production environmen ...

随机推荐

  1. VS2015前端工具:NPM和Web Essentials

    VS2015前端工具:NPM和Web Essentials 1.写作背景 想在5月份前换个工作环境了,“检讨”一下自己混饭的技术水平和处世的人脉关系,觉得很不给力!为人方面,人各有志也就不纠结了,但本 ...

  2. 国内首篇介绍JanOS物联网操作系统的文章 - 如何把你的手机主板打造成物联网平台

    天地会珠海分舵注:如无意外,您现在正在看的将是国内首篇且是唯一一篇介绍炙手可热的物联网的操作系统JanOS的文章!不信你去百度!希望大家能喜欢.但本文只是引言,更多信息请还是访问JanOS的官网:ht ...

  3. ckplayer

    ckplayer 的使用基本功能实现(一) 有个项目里用到视频播放功能,虽然是国产的插件,但我觉得做的还是不错,而且是免费使用,顺便支持下国内的一些项目(O(∩_∩)O~). 一.首先去官网下载 插件 ...

  4. Url.Content

    Url.Content了,Url是ViewPage的一个对象,它最常用的一个方法就是Content,它的功能是返回某个文件的路径.一般情况下,在使用了ASP.NET MVC后,目录结构变得有点诡异,像 ...

  5. __declspec(novtable)keyword

    __declspec (novtable )keyword,表示这个类不生成虚函数表.可是继承类不影响(无论基类是否使用了keyword). 不使用此keyword.类在生成对象时构造函数和析构函数多 ...

  6. codeforces #257 C称号Jzzhu and Chocolate

    职务地址:http://codeforces.com/contest/450/problem/C 这次CF的时候绝壁脑残了. ..A题和C题都出现了脑残失误... 唯一一个AC的B题还是被HACK了. ...

  7. 编写SQL的辅助工具

    原文:编写SQL的辅助工具 今天在同事的帮助下,下载了一个工具:ApexSQL edit,可能是我孤陋寡闻,不知道还有这样的好工具,它可以在我键入SQL时,帮助我提示表的名称和列名称.还可以帮助我格式 ...

  8. 如何配置Spring的XML文件及使用

    App.config <?xml version="1.0" encoding="utf-8" ?> <configuration> & ...

  9. Ibatis ISqlMapper工厂类案例

    namespace Model{ public class MapperFactory { //声明一个ISqlMapper接口类型的数据映射器 _mapper,其初始值为null private s ...

  10. asp.net页面生命周期回顾

    ---根据一讲师所讲做了一下笔记,仅供参考 会存在些错误 页面声明周期: 1.HttpApplication在第11和第12个事件之间开始了页面声明周期,调用了第8个事件创建实例的pr(Process ...