1. 程式人生 > >編譯apache報APR not found

編譯apache報APR not found

doc etc style pan 系統環境 系統 5.1 log ng-

系統環境:

[[email protected] download]$ cat /etc/redhat-release?

CentOS release 5.6 (Final)

[[email protected] download]$ uname -a

Linux rs-2 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux


編譯apache 2.4.9

[[email protected] httpd-2.4.9]$ ./configure --prefix=/usr/local/apache


編譯apache, 遇到下面錯誤

configure: error: APR not found.? Please read the documentation.


configure: error: APR-util not found.? Please read the documentation.



去http://archive.apache.org/dist/apr/去下載相關包

[[email protected] download]$ wget http://archive.apache.org/dist/apr/apr-1.5.1.tar.gz

[[email protected] download]$ wget http://archive.apache.org/dist/apr/apr-util-1.5.3.tar.gz



安裝 apr 包

[[email protected] apr-1.5.1]$ ./configure --prefix=/usr/local/apr

[[email protected] apr-1.5.1]$ make

[[email protected] apr-1.5.1]$ sudo make install



安裝apr-util

[[email protected] apr-util-1.5.3]$ ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config

?


[[email protected] apr-util-1.5.3]$ make?


[[email protected] apr-util-1.5.3]$ sudo make install


最後,編譯apache時候加上 --with-apr=/usr/local/apr \ --with-apr-util=/usr/local/apr-util/

[[email protected] httpd-2.4.9]$ ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/



編譯apache報APR not found