错误

[root@db1 ~]# /usr/local/apache/bin/apachectl -t
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/mod_dav_svn.so into server: /usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: sqlite3_open_v2

 

 

分析

[root@db1 ~]# ldd /usr/local/apache/modules/mod_dav_svn.so | grep libsvn_subr-
    libsvn_subr-1.so.0 => /usr/local/subversion/lib/libsvn_subr-1.so.0 (0x00002b35ca916000)
[root@db1 ~]# ldd /usr/local/subversion/lib/libsvn_subr-1.so.0 | grep libsqlite3.so.
    libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00002b3dd4770000)

[root@db1 ~]# ldconfig -p | grep sqlite
    libsqlite3.so.0 (libc6,x86-64) => /usr/local/sqlite/lib/libsqlite3.so.0
    libsqlite3.so.0 (libc6,x86-64) => /usr/lib64/libsqlite3.so.0
    libsqlite3.so (libc6,x86-64) => /usr/local/sqlite/lib/libsqlite3.so
    libsqlite3.so (libc6,x86-64) => /usr/lib64/libsqlite3.so
 

 

解决

[root@db1 sqlite-amalgamation-3070603]# ln -s /usr/local/sqlite/lib/libsqlite3.so.0.8.6 /usr/lib64
ln: creating symbolic link `/usr/lib64/libsqlite3.so.0.8.6' to `/usr/local/sqlite/lib/libsqlite3.so.0.8.6': File exists
[root@db1 sqlite-amalgamation-3070603]# mv /usr/lib64/libsqlite3.so.0.8.6 /root/bak
[root@db1 sqlite-amalgamation-3070603]# ln -s /usr/local/sqlite/lib/libsqlite3.so.0.8.6 /usr/lib64
[root@db1 sqlite-amalgamation-3070603]# ldconfig
[root@db1 sqlite-amalgamation-3070603]# /usr/local/apache/bin/apachectl -t
Syntax OK

 

总结

一些命令

ldconfig

NAME
       /sbin/ldconfig - configure dynamic linker run time bindings
       -p     Print the lists of directories and candidate libraries stored in
              the current cache.

ldd

NAME
       ldd - print shared library dependencies

SYNOPSIS
       ldd [OPTION]...  FILE...
 

其它方法

目的安装subversion服务器,在安装的过程中出现了以上的错误,参考其它文档发现可以避免在这个错误,请参考 svn服务器安装配置一文。