I don't know why there is no problem when installing apache2.2.22. Use the command directly
./Configure -- prefix =/home/www/www_test/software/Apache-2.2.22 -- enable-proxy -- enable-so -- enable-mod-shared = most -- With-MPM = worker
No problem, but an error is reported when the new version 2.4.2 is installed.
The solution is as follows:
#./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 help.
-- With-Permission ded-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
Install APR (Apache Portable Runtime)
[Root @ localhost ~] # Cd/tmp/52 lamp // source code storage location
[Root @ localhost 52 Lamp] # tar-zxvf apr-1.4.2.tar.gz // unzip-o apr-1.4.2.zip
[Root @ localhost 52 Lamp] # cd apr-1.4.2
[Root @ localhost apr-1.4.2] #./configure
[Root @ localhost apr-1.4.2] # Make
[Root @ localhost apr-1.4.2] # make install
Check the compilation environment again
Checking for APR-util... no
Configure: Error: Apr-util not found. Please read the documentation.
[Root @ localhost httpd-2.2.16] #./configure-help | grep Apr-util
-- With-Apr-util = path prefix for installed Apu or the full path
[Root @ localhost 52 Lamp] # tar-zxvf apr-util-1.3.9.tar.gz
[Root @ localhost 52 Lamp] # cd apr-util-1.3.9
[Root @ localhost apr-util-1.3.9] #./configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR
[Root @ localhost apr-util-1.3.9] # Make
[Root @ localhost apr-util-1.3.9] # make install
./Configure still prompts Apr-util not found. Add -- 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/
[Root @ localhost httpd-2.2.16] #./configure-help | grep PCRE
-- With-PCRE = path use external PCRE Library
[Root @ localhost 52 Lamp] # unzip-O pcre-8.10.zip
[Root @ localhost 52 Lamp] # cd pcre-8.10
[Root @ localhost CD pcre-8.10] #./configure -- prefix =/usr/local/PCRE
[Root @ localhost CD pcre-8.10] # Make
[Root @ localhost CD pcre-8.10] # make install
continue to install Apache/httpd ,. add the parameter -- With-Apr =/usr/local/APR/-- With-Apr-util =/usr/local/APR-util/-- With-PCRE =/usr /local/PCRE, this problem is solved.