当前位置: 技术问答>linux和unix
求助:cannot find -lexpat 。freeBSD6.2 用tar源码编译安装apache 2.2.6出错。
来源: 互联网 发布时间:2016-02-20
本文导语: server#tar -zxvf httpd-2.2.6.tar (省略文本) server#cd httpd-2.2.6 server#./configure --prefix=/usr/local/apache2 server#make (省略文本) Making all in mappers Making all in support /root/jmtdocs/httpd-2.2.6/srclib/apr/libtool --silent --mode=link gcc -g -O2 ...
server#tar -zxvf httpd-2.2.6.tar
(省略文本)
server#cd httpd-2.2.6
server#./configure --prefix=/usr/local/apache2
server#make
(省略文本)
Making all in mappers
Making all in support
/root/jmtdocs/httpd-2.2.6/srclib/apr/libtool --silent --mode=link gcc -g -O2 -o htpasswd htpasswd.lo -lm /root/jmtdocs/httpd-2.2.6/srclib/pcre/libpcre.la /root/jmtdocs/httpd-2.2.6/srclib/apr-util/libaprutil-1.la /root/jmtdocs/httpd-2.2.6/srclib/apr-util/xml/expat/lib/libexpat.la /root/jmtdocs/httpd-2.2.6/srclib/apr/libapr-1.la -lcrypt -lpthread
/usr/bin/ld: cannot find -lexpat
*** Error code 1
Stop in /root/jmtdocs/httpd-2.2.6/support.
*** Error code 1
Stop in /root/jmtdocs/httpd-2.2.6/support.
*** Error code 1
Stop in /root/jmtdocs/httpd-2.2.6.
server#
到这里就出错了。因为我这个服务器是内部使用,不能连接网络,无法用port安装。根据这个错误提示,我在网上找到一些有用的信息,主要是在 ./configure 时加入:
server#./configure --prefix=/usr/local/apache2 --with-expat=/usr/local
或
server#./configure --prefix=/usr/local/apache2 --with-expat=builtin
或2着结合
server#./configure --prefix=/usr/local/apache2 --with-expat=/usr/local --with-expat=builtin
也都不行,还是无法make apache2.2.6
特来求助,感谢!
(省略文本)
server#cd httpd-2.2.6
server#./configure --prefix=/usr/local/apache2
server#make
(省略文本)
Making all in mappers
Making all in support
/root/jmtdocs/httpd-2.2.6/srclib/apr/libtool --silent --mode=link gcc -g -O2 -o htpasswd htpasswd.lo -lm /root/jmtdocs/httpd-2.2.6/srclib/pcre/libpcre.la /root/jmtdocs/httpd-2.2.6/srclib/apr-util/libaprutil-1.la /root/jmtdocs/httpd-2.2.6/srclib/apr-util/xml/expat/lib/libexpat.la /root/jmtdocs/httpd-2.2.6/srclib/apr/libapr-1.la -lcrypt -lpthread
/usr/bin/ld: cannot find -lexpat
*** Error code 1
Stop in /root/jmtdocs/httpd-2.2.6/support.
*** Error code 1
Stop in /root/jmtdocs/httpd-2.2.6/support.
*** Error code 1
Stop in /root/jmtdocs/httpd-2.2.6.
server#
到这里就出错了。因为我这个服务器是内部使用,不能连接网络,无法用port安装。根据这个错误提示,我在网上找到一些有用的信息,主要是在 ./configure 时加入:
server#./configure --prefix=/usr/local/apache2 --with-expat=/usr/local
或
server#./configure --prefix=/usr/local/apache2 --with-expat=builtin
或2着结合
server#./configure --prefix=/usr/local/apache2 --with-expat=/usr/local --with-expat=builtin
也都不行,还是无法make apache2.2.6
特来求助,感谢!
|
如果有第二张盘,用packages安装expat就可以了!
目录/usr/ports/textproc/expat2
目录/usr/ports/textproc/expat2