0

启动 apache + SVN 时出错

以下是错误 -

-bash-4.1$ ./apachectl configtest
httpd: Syntax error on line 149 of /ngs/app/istsvnp/httpd/conf/httpd.conf: Cannot load modules/mod_dav_svn.so into server: /ngs/app/istsvnp/httpd/modules/mod_dav_svn.so: undefined symbol: svn_error_purge_tracing

检查 mod_dav_svn.so 的共享库依赖项时 -

bash-4.1$ ldd -r /ngs/app/istsvnp/httpd/modules/mod_dav_svn.so

            linux-vdso.so.1 =>  (0x00007fff9f7ff000)
            libsvn_repos-1.so.0 => /usr/lib64/libsvn_repos-1.so.0 (0x00007f42a4b58000)
            libsvn_fs-1.so.0 => /usr/lib64/libsvn_fs-1.so.0 (0x00007f42a4950000)
            libsvn_fs_fs-1.so.0 => /usr/lib64/libsvn_fs_fs-1.so.0 (0x00007f42a4728000)
            libsvn_fs_util-1.so.0 => /usr/lib64/libsvn_fs_util-1.so.0 (0x00007f42a4526000)
            libsvn_delta-1.so.0 => /usr/lib64/libsvn_delta-1.so.0 (0x00007f42a431a000)
            libsvn_subr-1.so.0 => /usr/lib64/libsvn_subr-1.so.0 (0x00007f42a40c9000)
            libaprutil-1.so.0 => /ngs/app/istsvnp/library/lib/libaprutil-1.so.0 (0x00007f42a3ea4000)
            libexpat.so.0 => /ngs/app/istsvnp/library/lib/libexpat.so.0 (0x00007f42a3c7c000)
            libapr-1.so.0 => /ngs/app/istsvnp/library/lib/libapr-1.so.0 (0x00007f42a3a4a000)
            librt.so.1 => /lib64/librt.so.1 (0x00007f42a3842000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f42a360a000)
            libz.so.1 => /lib64/libz.so.1 (0x00007f42a33f4000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00007f42a31f0000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f42a2fd2000)
            libc.so.6 => /lib64/libc.so.6 (0x00007f42a2c3e000)
            libsvn_fs_base-1.so.0 => /usr/lib64/libsvn_fs_base-1.so.0 (0x00007f42a2a0f000)
            libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f42a277f000)
            libexpat.so.1 => /ngs/app/istsvnp/Libexpat/lib/libexpat.so.1 (0x00007f42a2557000)
            libdb-4.7.so => /lib64/libdb-4.7.so (0x00007f42a21e3000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f42a4fb9000)
            libfreebl3.so => /lib64/libfreebl3.so (0x00007f42a1f6b000)
            undefined symbol: ap_filter_flush   (/ngs/app/istsvnp/httpd/modules/mod_dav_svn.so)
            undefined symbol: svn_error_purge_tracing   (/ngs/app/istsvnp/httpd/modules/mod_dav_svn.so)
            undefined symbol: svn_repos_fs_change_rev_prop4 (/ngs/app/istsvnp/httpd/modules/mod_dav_svn.so)
            undefined symbol: svn_repos__fs_type    (/ngs/app/istsvnp/httpd/modules/mod_dav_svn.so)
            undefined symbol: dav_register_provider (/ngs/app/istsvnp/httpd/modules/mod_dav_svn.so)
            undefined symbol: ap_fputstrs   (/ngs/app/istsvnp/httpd/modules/mod_dav_svn.so)
            ......
            ......

我可以在安装了 Apache + SVN 的测试框中以相同的配置启动 apache,没有任何问题。

但是将所有必要的二进制文件复制到生产框并在那里启动 apache 会产生上述错误。

我已验证 LD_LIBRARY_PATH 没有问题,并且通过创建 tar 文件并执行 sftp 将测试框的所有内容复制到生产框。

即使我从生产箱中删除了所有 Apache + SVN 引用并在测试箱中重新安装了 Apache + SVN 模块,并再次将二进制文件从测试箱复制到生产箱,仍然发生了同样的错误。

但我只能在没有 SVN 模块的情况下启动 apache 模块(即通过从 httpd.conf 中删除 mod_dav_svn.so 和 mod_authz_svn.so)

以下是我在测试框中安装 SVN 的方式。

tar jxf subversion-1.8.11.tar.bz2
cd subversion-1.8.11           

./configure --prefix=/ngs/app/apstoold/ApacheAndSVN/subversion --disable-static --with-expat=/ngs/app/apstoold/ApacheAndSVN/Libexpat/include:/ngs/app/apstoold/ApacheAndSVN/Libexpat:lib --with-apxs=/ngs/app/apstoold/ApacheAndSVN/httpd/bin/apxs --with-apr=/ngs/app/apstoold/ApacheAndSVN/library/bin/apr-1-config --with-apr-util=/ngs/app/apstoold/ApacheAndSVN/library/bin/apu-1-config

make
make install

我安装了以下版本。

Server: Apache/2.4.12 (Unix) OpenSSL/1.0.2 SVN/1.8.11 PHP/5.5.21 

有人可以帮帮我吗。

谢谢

4

1 回答 1

1

你显然有一个依赖问题。我不知道您使用的是哪个发行版,但我猜(!)您已经手动将 SVN 更新到 1.8.x 并且遇到了这些问题。可能存在多个问题:

  1. 你有 libapache2-svn 2.2 与 2.4 的问题
  2. 你有 libsvn1 1.6.x/1.7.x vs 1.8.x 的问题
  3. 您可能有加载模块依赖问题,请参见此处: https ://serverfault.com/questions/540873/problems-after-updating-svn-to-1-8-3-on-ubuntu-12-10-using-wandisco-包裹
于 2015-03-28T11:49:26.863 回答