cannot open shared object file: No such file or directory

一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误,
比如:
error while loading shared libraries: libxxx.so: cannot open shared object file: No such file or directory

原因一般有两个,

一个是操作系统里确实没有包含该共享库(lib*.so.*文件)或者共享库版本不对, 遇到这种情况重新下载并安装上即可.
另外一个原因就是已经安装了该共享库, 但执行需要调用该共享库的程序的时候, 程序按照默认共享库路径找不到该共享库文件.

解决方案:

1.检查系统路径(/usr/lib64或者/lib64)下是否有该文件
2.通过ldd命令检查当前so文件依赖的动态库是否都能找到
3.如果共享库文件安装到了/usr/local/lib目录下, 那么需执行一下ldconfig命令

说明:ldconfig命令的用途, 主要是在默认搜寻目录(/lib和/usr/lib)以及动态库配置文件/etc/ld.so.conf内所列的目录下,
搜索出可共享的动态链接库(格式如lib*.so*), 进而创建出动态装入程序(ld.so)所需的连接和缓存文件.
缓存文件默认为/etc/ld.so.cache, 此文件保存已排好序的动态链接库名字列表.

原文地址:https://www.cnblogs.com/zhanggaofeng/p/10187409.html

时间: 2024-10-11 11:13:18

cannot open shared object file: No such file or directory的相关文章

ogg启动报错libnnz11.so: cannot open shared object file

当ogg软件解压,并给予正确的权限后,在启动ogg时会遇到如下报错: [[email protected] ogg]# ./ggsci./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory 这里是因为缺少libnnz11.so库文件造成的,需要给出此库文件的位置,解决如下: [Oracle@oggtest ogg]$

libuuid.so: cannot open shared object file: No such file or directory

在玩ngx-lua时候有个 resty-uuid 需要引用 libuuid.so 动态库 打印log提示信息是这样的: libuuid.so: cannot open shared object file: No such file or directory 解决方案: [[email protected] ~]#yum install libuuid libuuid-devel [[email protected] ~]#ln -s /lib64/libuuid.so.1.3.0 /usr/l

ArchLinux 下 virtualbox 报错 libQtCore.so.4: cannot open shared object file

VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: libQtCore.so.4: cannot open shared object file: No such file or directory

ubuntu解决libstdc++.so.6: cannot open shared object file: No such file or directory:问题

解决libstdc++.so.6: cannot open shared object file: No such file or directory:原因在于,在13.10 版本中,ia32_libs 被废弃了导致没有32位的lib库.解决方法sudo apt-get install lib32stdc++6sudo apt-get install lib32z1

libdb2.so.1: cannot open shared object file: No such file or directory

[[email protected] bin]# ./dsmserv ./dsmserv: error while loading shared libraries: libdb2.so.1: cannot open shared object file: No such file or directory [[email protected] bin]# pwd /opt/tivoli/tsm/server/bin Resolving the problem The below steps m

OGG登陆报cannot open shared object file错误处理

1.错误现象 Linux服务器上,新安装的goldengate(OGG),使用./ggsci登 陆控制台报出./ggsci: error while loading shared libraries: libnnz11.so: cannotopen shared object file: No such file or directory错误. 2.原因分析 因为运行OGG的用户的没有设置LD_LIBRARY_PATH环境变量,或设置不正确所致. 3.解决方法: 在.bash_profile中增

启动MongoDB时,提示:error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

启动MongoDB时,提示: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory [[email protected] ~]# /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data --logpath /usr/local/mongodb/logs/mon

ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory

情景:在python中使用mysql 已知: [[email protected] muahao03]# pip list Django (1.7.1) MySQL-python (1.2.5) pip (1.5.6) pysqlite (2.6.3) setuptools (8.2.1) wsgiref (0.1.2) 已经安装 MySQL-python 报错: ImportError: libmysqlclient.so.18: cannot open shared object file:

运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory -------------------------------------------------------------------------------------------------------------------------------------

2、Ora_Q2_libXext.so.6:cannot open shared object file

[Q2]libXext.so.6:cannot open shared object file [原因]在64位的centos安装64位的oracle的时候,有时候会出现"libXext.so.6: cannot open shared objectfile:"的错误. 这个原因主要是oracle在安装的时候需要安装一些32位的lib,也就是类似于windows下的dll [解决方法] #yum install -y  libXext.i686