I can believe fly.

Tuesday, December 21, 2010

SVN命令行:error while loading shared libraries

错误类似信息:

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

 

以下是本人在执行脚本报如上错误时,查找原因的步骤信息

1.执行ldd $(which svnlook),获取含有so.0:文件的信息(文件存在,为何还报错呢?)

libsvn_repos-1.so.0 => /usr/local/lib/libsvn_repos-1.so.0 (0x00002b0260dd2000)

2. 接着试单独执行svnlook ......,结果是正常使用的;

3. 继续执行了whereis svnlook ,得出以下两个路径:

usr/bin/svnlook usr/bin/local/svnlook

4. 紧接,试着单独执行usr/bin/svnlook,结果报了一样的错误(注:脚本带有/usr/bin/env,因此脚本运行时也是使用这路径的命令)

5. 执行ldd /usr/bin/svnlook,需要的文件真的是找不到 

libsvn_repos-1.so.0 => not found

libsvn_fs-1.so.0 => not found

libsvn_fs_fs-1.so.0 => not found

libsvn_fs_base-1.so.0 => not found

libsvn_delta-1.so.0 => not found

libsvn_diff-1.so.0 => not found

libsvn_subr-1.so.0 => not found

 

结论usr/bin/svnlook该路径的命令有问题

处理:

a.安全起见,备份下原来的

mv /usr/bin/svnlook /usr/bin/svnlook_back

b.重新ln一份正常的

ln -s /usr/local/bin/svnlook /usr/bin/svnlook


--
Elian
 
Configuration Manage Engineer
MSN: smallfish961@hotmail.com
Email: smallfish382+work@gmail.com

No comments: