博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
定位问题的利器之strace
阅读量:5145 次
发布时间:2019-06-13

本文共 2982 字,大约阅读时间需要 9 分钟。

svn安装在了tools目录外面,把文件夹移动tools/下的时候,发现svn不能用了,报错

error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory

 

1、之前出现过这样的问题,大师教招:strace。于是用strace svn跑了下,发现

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变量,加入这个路径还是有问题。只能请教大师

2、大师招数1——ldd命令查看 so文件,发现so not found

  libsvn_client-1.so.0 => not found

        libsvn_wc-1.so.0 => not found

3、大师招数2——查看LD_LIBRARY_PATH变量

发现是空的

于是传授入下

1)LD_LIBRARY_PATH变量设置上svn的lib路径

于是在~/.bashrc里面加入了

“export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/tools/”

source ~/.bashrc后解决

转载于:https://www.cnblogs.com/mangu-uu/archive/2012/08/23/2652428.html

你可能感兴趣的文章
oracle 创建暂时表
查看>>
201421410014蒋佳奇
查看>>
Xcode5和ObjC新特性
查看>>
LibSVM for Python 使用
查看>>
Centos 7.0 安装Mono 3.4 和 Jexus 5.6
查看>>
CSS属性值currentColor
查看>>
java可重入锁reentrantlock
查看>>
浅谈卷积神经网络及matlab实现
查看>>
解决ajax请求cors跨域问题
查看>>
《收获,不止Oracle》pdf
查看>>
LinkedList<E>源码分析
查看>>
Real-Time Rendering 笔记
查看>>
如何理解HTML结构的语义化
查看>>
Activity之间的跳转:
查看>>
实验四2
查看>>
Android现学现用第十一天
查看>>
多路复用
查看>>
Python数据可视化之Pygal(雷达图)
查看>>
Java学习笔记--字符串和文件IO
查看>>
转 Silverlight开发历程—(画刷与着色之线性渐变画刷)
查看>>