Fedora下解决apache配置出错
<p style="text-indent: 2em">在fedora8上<a target="_blank" href="#" class="UBBWordLink">安装</a>apache</p><p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>tar -zxvf httpd-2.2.8.tar.gz</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>cd httpd-2.2.8</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>./configure --prefix=/usr/local/httpd</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>make</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">make的时候出现下面错误,以前配没遇到过这问题</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">libtool: link: `passwd/apr_getpass.lo' is not a valid libtool object</p>
<p style="text-indent: 2em">make: *** 错误 1</p>
<p style="text-indent: 2em">make: Leaving directory `/root/httpd-2.2.8/srclib/apr'</p>
<p style="text-indent: 2em">make: *** 错误 1</p>
<p style="text-indent: 2em">make: Leaving directory `/root/httpd-2.2.8/srclib/apr'</p>
<p style="text-indent: 2em">make: *** 错误 1</p>
<p style="text-indent: 2em">make: Leaving directory `/root/httpd-2.2.8/srclib'</p>
<p style="text-indent: 2em">make: *** 错误 1</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">后来发现原来是缺少 apr & apr-util.</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">去http://apr.apache.org/ 下来最新的apr-1.2.12-tar.gz和apr-util-1.2.12.tar.gz</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>tar -zxvf apr-1.2.12-tar.gz</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>cd apr-1.2.12</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>./configure --prefix=/usr/local/apr-httpd/</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>make & make install</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>tar -zxvf apr-util-1.2.12-tar.gz</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>cd apr-util-1.2.12</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>make & make install</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">回到apache编译目录</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>./configure --prefix=/usr/local/httpd/ --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>make</p>
<p style="text-indent: 2em"> </p>
<p style="text-indent: 2em">>make install</p> 楼主好,这个错误一般是 apr 目录里的 libtool 对象文件没生成好,或者上次编译残留造成的。
建议先清理再重编:
cd /root/httpd-2.2.8
make clean
find srclib/apr -name "*.lo" -o -name ".libs" | xargs rm -rf
./configure --prefix=/usr/local/httpd
make
如果还报同样的错,直接删掉目录重新解压源码包,有时解压不完整或文件时间戳有问题也会这样:
cd /root
rm -rf httpd-2.2.8
tar -zxvf httpd-2.2.8.tar.gz
cd httpd-2.2.8
./configure --prefix=/usr/local/httpd
make
另外确认一下编译工具链是否完整:
yum install libtool automake autoconf apr-devel apr-util-devel
如果还是卡在 apr,可以试试用系统自带的 apr 来编译 Apache:
./configure --prefix=/usr/local/httpd --with-apr=/usr --with-apr-util=/usr
make
Fedora 8 确实比较老了,如果只是要跑 Apache,个人觉得直接 yum install httpd 会省事很多。希望这些能帮到你。
页:
[1]