jixuji 发表于 2013-7-12 09:25:53

apache编译故障-apr-not-found.docx

安装Apache的步骤# 下载httpd-2.2.23.tar.gz安装包# tar zxvfhttpd-2.2.23.tar.gz# cd httpd-2.2.23# ./configure--prefix=/usr/local/apache2# make && makeinstall在安装过程中,执行./configure --prefix=/usr/local/apache2后出现报错信息如下:“configure: error: APR not found . Please readthe documentation”解决办法:1、首先需要下载三个软件包   wgethttp://archive.apache.org/dist/apr/apr-1.4.5.tar.gz   wgethttp://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz   wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip1)、第一步解决“apr not found”   #tar zxvf apr-1.4.5.tar.gz    #./configure –prefix=/use/local/apr    #make&&makeinstall2)、第二步解决“apr-utilnot found”    # tar -zxfapr-util-1.3.12.tar.gz# cd apr-util-1.3.12#./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr/bin/apr-1-config# make && make install   3)、第三步解决pcre问题          #unzip -opcre-8.10.zip#cd pcre-8.10#./configure --prefix=/usr/local/pcre#make && make install如果出现报错信息,以上解决步骤缺一不可<1>、在安装pcre的时候可能遇到的问题:“libtool: line 990: g++: command not found”解决办法:安装gcc-c++       #yum install gcc-c++在安装gcc-g++后我们继续make。g++问题解决了但是出现以下错误         ibtool: link: Fatalconfigurationerror.         make: *** 错误 1         make: Leaving directory `/usr/app/pcre-8.00'         make: *** 错误 2现在我们需要操作的就是重新./configure并且make,如果问题依然没有得到解决并报错/usr/bin/ld: .libs/pcrecpp.o: relocationR_X86_64_32S against `.bss'can not be used when making a shared object;recompile with -fPIC.libs/pcrecpp.o:couldnot read symbols: Bad valuecollect2: ld returned 1exit statusmake: *** 错误 1make: Leaving directory`/usr/app/pcre-8.00'make: *** 错误 2这次解决的办法是在配置的时候添加“--disable-shared --with-pic”# ./configure –prefix=/use/local/pcre –disable-shared–with-pic以上问题都解决后我们可以继续安装apache了,在编译的时候我们需要加上“--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre=/usr/local/pcre”如#./configure–prefix=/use/local/apache2 --with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-pcre=/usr/local/pcre

suncool 发表于 2013-7-12 21:44:09

恋爱就是无数个饭局,结婚就是一个饭局。

lig 发表于 2013-7-13 03:46:34

人生不能像做菜、把所有的料都准备好才下锅!

天高云淡 发表于 2013-7-13 18:38:19

解释就是掩饰,掩饰就是编故事!

uf123 发表于 2013-7-14 10:14:52

站的更高,尿的更远。

beebe_3 发表于 2013-7-14 16:46:03

解释就系掩饰,掩饰等于无出色,无出色不如回家休息!!!

chj0771 发表于 2013-7-14 22:39:10

勿以坑小而不灌,勿以坑大而灌之。
页: [1]
查看完整版本: apache编译故障-apr-not-found.docx