我正在运行CentOS 6.3 64位和DirectAdmin控制面板。 目前我已经安装了Apache Subversion 1.6.19,没有任何问题。
我用yum安装了expat和expat-devel和neon-devel。
当安装Apache Subversion 1.6.19时,这个configuration命令工作正常:
./configure --prefix=/usr --with-ssl --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config
但是,当使用与上面相同的configure命令来安装Apache Subversion 1.7.7时,在执行comm命令“make”后出现这个错误:
/etc/httpd/lib/libaprutil-1.so: undefined reference to `XML_StopParser' collect2: ld returned 1 exit status make: *** [subversion/svnadmin/svnadmin] Error 1
不过,我发现我可以通过在configure命令中join这个问题来解决这个问题:
--with-expat=includes:lib_search_dirs:libs
所以它看起来像这样:
./configure --prefix=/usr --with-ssl --with-expat=includes:lib_search_dirs:libs --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config
然而,那个configuration命令然后给这个警告:
configure: WARNING: Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option.
所以我想解决这个问题。 我有很多的实验,但是还没有弄清楚如何在configure命令中“指定Expat的确切位置”,以及如何找出这个位置应该是什么?
然而,经过大量的search,我发现这个: http : //subversion.tigris.org/issues/show_bug.cgi?id=3997 – 这是一个FreeBSD用户这样说的:
Building Subversion 1.7.x on FreeBSD currently requires a configure flag: --with-expat=/usr/local/include:/usr/local/lib:expat As that is the default location of expat on that platform, it would be nice if configure detected it automatically.
但是我没有使用FreeBSD,我正在运行CentOS 6.3 64bit。 还记得我说过我用yum安装了expat和expat-devel和neon-devel。
但是我试图使用FreeBSD用户发布的expat / commandpath,它似乎起作用,运行configure命令时不会出错,而且在运行“make”时不会出错。 这就是我当时使用的:
./configure --prefix=/usr --with-ssl --with-expat=/usr/local/include:/usr/local/lib:expat --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config
但是这台服务器是一个生产服务器,因此如果在CentOS服务器上运行也是正确的,我需要你的帮助。 expat命令中的以下path在CentOS上是否正确?
--with-expat=/usr/local/include:/usr/local/lib:expat
如果没有,请告知应该更改的内容。 在此先感谢您的任何确认或帮助!
我错了,FreeBSD的expat位置在CentOS上不起作用。 这个:
./configure --prefix=/usr --with-ssl --with-expat=/usr/local/include:/usr/local/lib:expat --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config
做完“make”后出现这个错误:
/etc/httpd/lib/libaprutil-1.so: undefined reference to `XML_StopParser' collect2: ld returned 1 exit status make: *** [subversion/svnadmin/svnadmin] Error 1
我放弃。 我没有find任何有关如何在互联网上的任何地方(在解决scheme已经search一个多星期后)在CentOS上述命令中指定expat loacation的任何答案,并已经发布了几个地方的帮助。
你已经安装了expat-devel软件包,对不对?