Apache遇到的问题 APR not found问题的解决方法

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

#./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

时间: 2024-09-17 04:49:05

Apache遇到的问题 APR not found问题的解决方法的相关文章

Apache遇到的问题 APR not found问题的解决方法_Linux

#./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

Apache无法自动跳转却显示目录的解决方法_php实例

Apache无法自动跳转却显示目录这是因为Apache服务器下conf/httpd.conf没有配置好,其默认是不跳转,直接显示目录 首先,我们需要禁止Apache直接显示目录. 方法在搜索Options Indexes FollowSymLinks,将其该为Options FollowSymLinks   其实,解决Apache无法自动跳转的问题,这是因为Apache本来只是一个http服务器,不会自动跳转到index.php页面.需要定位<IfModule dir_module>这一项,将

mac os 下tomcat apr 警告解决方法

The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:...tomcat可以整合本地apr,在处理静态资源的时候速度更快,总而言之就是使用本地的apr库提升处理效率.在网上一查,很多人提到了这个问题,解决这个问题其实很简单,但window和linux处理方法不太一样.下

win8下XAMPP中Apache模块无效(apache无法打开)的解决方法

win8下系统默认占用80端口,导致apache无法打开,下面是具体的解决方法:首先以管理员权限运行c:windowssystem32cmd.exe.....感兴趣的朋友可以参考下哈,希望对大家有所帮助   win8下系统默认占用80端口,导致apache无法打开. 以管理员权限运行c:windowssystem32cmd.exe C:WINDOWSsystem32>net stop http HTTP Service 服务已成功停止. C:WINDOWSsystem32>netstat -a

Apache的基本设置和乱码解决方法

Apache的基本设置和乱码解决方法 一.Apache基本设置 1.Apache的核心配置文件名是"httpd.conf",其所存放的路径为"X:Apache2conf"目录下.用记事本打开它后,对它进行修改后再保存便可达到配置Apache服务器的目的. 2.由于配置文件"httpd.conf"决定着整个Apahce服务器的使用,因此对于它的修改千万要小心!强烈建议先做好多个备份,以防出错!如果实在忘了备份了,系统还为你准备了个名为"h

Apache启动提示错误undefined symbol: libiconv_open解决方法_Linux

昨晚整合apache和php是实在找不到解决办法,Google 百度都转一圈了,总算在百度找回来解决方法,记录一下,这个问题是在apache启动时出现的: ./apachectl  start提示下面的错误: 复制代码 代码如下: httpd: Syntax error on line 57 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /

apache服务出现Forbidden 403问题的解决方法总结_Linux

在配置Linux的 Apache服务时,经常会遇到http403错误,我今天配置测试时也出现了,最后解决了,总结了一下.http 403错误是拒绝访问的意思,有很多原因的.还有,这些问题在win平台的Apache里一样会发生!我按照经验总结的主要有以下4种原因! 本人测试的环境 是:Scientific Linux 5.3(与RHEL和CentOS百分百兼容!),其它版本的Linux应该通用,没测试. 1. 访问的文档权限不够.要755以上权限.解决方法:用命令chmod 755 /var/ww

apache日志文件过大解决方法

置web服务器时,一般我们都会记录下请求的信息,以及错误的相关信息.  代码如下 复制代码 ErrorLog "/home/zhangy/apache/www.test.com-error.log" CustomLog "/home/zhangy/apache/www.test.com-access.log" common 做了上面的配置,如果你不定期删除的话,我想随着时间的推移,这些日志文件能达到几个G的大小.占用资源不说,还不利于我们查看日志信息.其实对访问信息

APMServ5.2.6 Apache启动失败,解决方法

apmserv5.2.6 apache启动失败,解决方法 apmserv5.2.6启动... 提示:apache启动失败,请检查相关配置 因为我们学校使用的是dr.com 宽带认证客户端(万恶的校园网!...) 需要修复一下winsock,因为这些上网的程序会修改此文件. 解决方法如下: 开始 运行,输入netsh winsock reset 回车等待片刻就可...