svn: error while loading shared libraries: libsvn_client-1.so.0
http://www.cnblogs.com/mangu-uu/archive/2012/08/23.html
定位問(wèn)題的利器之stracesvn安裝在了tools目錄外面,把文件夾移動(dòng)tools/下的時(shí)候,發(fā)現(xiàn)svn不能用了,報(bào)錯(cuò)
error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory
?
1、之前出現(xiàn)過(guò)這樣的問(wèn)題,大師教招:strace。于是用strace svn跑了下,發(fā)現(xiàn)
strace ./bin/svn
execve("./bin/svn", ["./bin/svn"], [/* 22 vars */]) = 0
uname({sys="Linux", node="cq01-testing-img12.vm.baidu.com", ...}) = 0
brk(0)????????????????????????????????? = 0x52e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95556000
access("/etc/ld.so.preload", R_OK)????? = -1 ENOENT (No such file or directory)
open("/home/work/svn/lib/tls/x86_64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/work/svn/lib/tls/x86_64", 0x7fbfffed30) = -1 ENOENT (No such file or directory)
open("/home/work/svn/lib/tls/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/work/svn/lib/tls", 0x7fbfffed30) = -1 ENOENT (No such file or directory)
..open("/usr/lib64/tls/x86_64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7fbfffed30) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib64/x86_64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7fbfffed30) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64", {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY)????? = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=75094, ...}) = 0
mmap(NULL, 75094, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a95557000
close(3)??????????????????????????????? = 0
open("/lib64/tls/x86_64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fbfffed30) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib64/x86_64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fbfffed30)???? = -1 ENOENT (No such file or directory)
open("/lib64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib64/tls/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libsvn_client-1.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
修改了bashrc中的path變量,加入這個(gè)路徑還是有問(wèn)題。只能請(qǐng)教大師
2、大師招數(shù)1——ldd命令查看 so文件,發(fā)現(xiàn)so not found
? libsvn_client-1.so.0 => not found
??????? libsvn_wc-1.so.0 => not found
3、大師招數(shù)2——查看LD_LIBRARY_PATH變量
發(fā)現(xiàn)是空的
于是傳授入下
1)LD_LIBRARY_PATH變量設(shè)置上svn的lib路徑
于是在~/.bashrc里面加入了
“export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/tools/”
source ~/.bashrc后解決
?
總結(jié)
以上是生活随笔為你收集整理的svn: error while loading shared libraries: libsvn_client-1.so.0的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: java将html实体字符转换成正常字符
- 下一篇: rm: cannot remove di