libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr 故障解决

源码编译安装完成之后,查看svn的安装版本会报以下错误

svn: symbol lookup error: /usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr

问题是出在了libsvn_subr-1.so.0库文件上,那就先查看一下它所依赖的动态连接库信息吧

        ldd /usr/local/subversion/lib/libsvn_subr-1.so.0
        linux-vdso.so.1 =>  (0x00007fff023fd000)
        libaprutil-1.so.0 => /usr/local/apr-util/lib/libaprutil-1.so.0 (0x00002ac3fe99f000)
        libapr-1.so.0 => /usr/local/apr/lib/libapr-1.so.0 (0x00002ac3febc3000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00002ac3fee02000)
        librt.so.1 => /lib64/librt.so.1 (0x00002ac3ff006000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002ac3ff210000)
        libexpat.so.0 => /lib64/libexpat.so.0 (0x00002ac3ff448000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002ac3ff66a000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002ac3ff87f000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ac3ffa83000)
        libmagic.so.1 => /usr/lib64/libmagic.so.1 (0x00002ac3ffc9e000)
        libc.so.6 => /lib64/libc.so.6 (0x00002ac3ffeae000)
        /lib64/ld-linux-x86-64.so.2 (0x00000038e5200000)

问题找到了,libaprutil-1.so.0和libapr-1.so.0两个库文件连接的还是操作系统自带的apr和aprutil库文件,没有使用我之前编译安装的最新的库文件,依赖出错造成的这种问题。

1、不用卸载操作系统原有包,更改libaprutil-1.so.0和libapr-1.so的链接位置

rm /usr/lib64/libapr-1.so.0
ln -s /usr/local/apr/lib/libapr-1.so.0 /usr/lib64/libapr-1.so.0
rm /usr/lib64/libaprutil-1.so.0
ln -s /usr/local/apr-util/lib/libaprutil-1.so.0  /usr/lib64/libaprutil-1.so.0

2、卸载操作系统自带的这两个包,然后将最新编译的apr相关类库目录的位置打到/etc/ld.so.conf文件中,然后执行ldconfig就OK

# rpm -qa|grep apr
apr-util-1.2.7-11.el5_5.2
apr-1.2.7-11.el5_6.5
apr-util-1.2.7-11.el5_5.2
apr-1.2.7-11.el5_6.5

#rpm -e --allmatches apr-util
#rpm -e --allmatches  apr
#echo '/usr/local/apr/lib'>>/etc/ld.so.conf
#echo '/usr/local/apr-util/lib'>>/etc/ld.so.conf
#ldconfig 

再次进行版本的检查,已经返回成功了。

# svn --version
svn, version 1.8.13 (r1667537)
   compiled Jun  4 2015, 10:01:00 on x86_64-unknown-linux-gnu

Copyright (C) 2014 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

  

posted @ 2015-06-08 10:24  贱书生  阅读(2818)  评论(0编辑  收藏  举报