`

从源码安装apache2,遇到错误:cannot install `libaprutil-1.la' LAMP 2010-07-23 20:57:15 阅读3

    博客分类:
  • PHP
阅读更多

 

从源码安装apache2,遇到错误:cannot install `libaprutil-1.la

从源码安装apache2,遇到错误:cannot install `libaprutil-1.la

教人学Apache......

http://www.apache.org/上下载的源码安装 apache2,
Redhat AS 4
执行了configure,make后
make install时出错:

/bin/sh /usr/local/httpd-2.2.3/srclib/apr/libtool --mode=install /usr/bin/install -c -m 755 libaprutil-1.la /usr/local/apache2/lib
libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apache22/lib
make[2]: *** [install] Error 1


经过折腾之后找到规律:
./configure 
make
make install
顺序不会出错

./configure --prefix=/app/apache
make
make install
顺序就会出错...


分析:
从apache网站上下载的source code,应该不会有如此不能安装到非/usr/local目录的低级错误。
肯 定是自己有疏忽,猜测可能是以前安装用过./configure 来直接安装到/usr/local/apache2
导致安装文件已经不太“干 净”

解决:
删除source code目录,重新tar -zxvf下载的apache安装包,上面的问题解决。

后来google了下面一句:

If some options do not become active after doing a configure; make; make install, try to do a make clean after configure.

 

看来make clean也是一个解决方式.... 可叹以前重新编译Linux 内核的时候还用过它...四年不用就忘这么干净。 受到启发 ,从新解压一份源码,后安装,OK了!
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics