Problems encountered by Apache solutions to APR not found problems

  • 2020-05-09 19:43:18
  • OfStack

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

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

You can use./configure, help |, grep apr to view the help. -- with-included-apr   Use bundled copies of APR/ APR-Util with-apr =PATH               prefix for installed or the path path path config --with apr util=PATH   checking for APR... no configure: error: APR not found .   Please read the documentation. prefix for or the full path to Download installation APR (Apache Portable Runtime) : http: / / apr apache. org/download cgi

#cd /tmp/52lamp/ // source location # tar-zxvf apr-1.4.2.tar.gz // unzip-o apr-1.4.2.zip #cd apr-1.4.2.zip # configure #make make install

Check again that the compile environment appears

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

#./configure en | grep apr-util -- es1064en-apr-util =PATH     prefix for installed or the full path to

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 #make #make install

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

#./configure | grep pcre -- with-pcre =PATH           external PCRE 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 the correct parameters during installation. Incorrect parameters will be 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 1 row/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 line 2:           0-operation       1 - #         2 - usage error         not be be not be #           httpd be a restart

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, it looks like 1 cut is normal; But other computers in the LAN can't access it!

#service iptables stop

If you don't want to close the firewall, release port 80.

Add 1 line to #vi /etc/sysconfig/iptables -- A RH Firewall-1-INPUT-m state --state NEW-p tcp --dport service iptables restart // restart the firewall

Now 1 cut OK


Related articles: