Problem encountered by Apache solution to APR not found problem

  • 2020-05-06 12:10:12
  • OfStack

#. / configure - prefix... When checking the editing environment:

appears

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

You can view the help with the./configure, help |, grep apr. -- with-included-apr       of of APR/ APR-Util with-apr =PATH               prefix for installed the the full es51-config -- with-apr-util =PATH       prefix for APU or full path to Download installation APR (Apache Portable Runtime) : http: / / apr apache. org/download cgi

cd /tmp/52lamp/ /

Check again that the compile environment appears

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

#./configure | help grep apr util --with apr-util =PATH   for installed installed the path

Download: 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

./configure still prompts APR-util not found, add -- with-apr =/usr/local/apr -- with-apr-util =/usr/local pcre - config for libpcre not found. PCRE is required and available from http: / / pcre org/

#./configure, help |, grep pcre -- with-pcre =PATH           Use library

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

Continue installation Apache/httpd,... / configure plus parameters - with - apr = / usr/local/apr / -- with - apr - util = / usr/local/apr - util / -- with - pcre = / usr/local/pcre, this problem is solved

Note: Apache is not checked for correct parameters during installation, and incorrect parameters are simply discarded and not reported to the user. But can you use echo $? The command checks for errors, and when the output is 0, there are no errors.

#echo $? 0

#make #make install

Copy Apache boot file # cp/usr local/httpd bin/apachectl/sbin/

Start Apache #apachectl start

Set Apache self-starting # vi/boot etc/rc d/rc local add one line/sbin/apachectl start

Or add httpd service to the ntsysv service management tool # apachectl stop / / close Apache so as to avoid unnecessary trouble # cp/usr local/httpd/bin/apachectl/etc/rc d/init d/httpd # vi / etc rc. d/init. d/httpd changed to #! /bin/sh # #chkconfig: 345 85 15 //# cannot be omitted, note the space #description: httpd for 52lamp 20101016 21:54 // any string #...

The meaning of 345 in the second line:         operation   2 - usage         not be stopped          

Modify the relevant permissions # cd/etc/rc d/init d / # chmod a + x httpd # chkconfig -- add httpd

#ntsysv httpd is already in the list, press F1 to see the service description you just wrote 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

Enter 127.0.0.1 in the browser and everything looks fine. But other computers in the LAN can't access!

#service iptables stop

If you do not want to close the firewall, release port 80.

Add a row of -- A -- Firewall -- INPUT -- m -- state // restart firewall

Now everything is OK


Related articles: