
CentOS 6.3 64 ビットと DirectAdmin コントロール パネルを実行しています。現在、Apache Subversion 1.6.19 を問題なくインストールしています。
yum を使用して expat と expat-devel と neon-devel をインストールしました。
Apache Subversion 1.6.19 をインストールする場合、この configure コマンドは正常に機能します。
./configure --prefix=/usr --with-ssl --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config
ただし、上記と同じ configure コマンドを使用して Apache Subversion 1.7.7 をインストールすると、コマンド「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 コマンドに以下を追加することでこの問題を解決できることがわかりました。
--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
ただし、その configure コマンドは次の警告を発します。
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 の正確な場所を指定する」方法や、その場所がどこにあるべきかを調べる方法がわかりません。
しかし、いろいろ検索した結果、次のことがわかりました。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 64 ビットを実行しています。また、yum を使用して expat、expat-devel、neon-devel をインストールしたと述べたことを覚えておいてください。
しかし、FreeBSD ユーザーが投稿した expat/command パスを使用しようとしたところ、うまく機能しているようで、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 コマンドの次のパスは 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
諦めました。インターネット上のどこにも、CentOS の上記コマンドで expat の場所を指定する方法についての回答が見つからず (解決後 1 週間以上検索しています)、いくつかの場所に助けを求めて投稿しました。
答え1
あなた持っているパッケージをインストールしましexpat-devel
たか?