error while loading shared libraries的解決方法

在linux下运行程序时,发现了error while loading shared libraries这种错误,一时间不知道解决办法,在网上搜索,终于解决了:

./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
出现这类错误表示,系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。

一般而言,有很多的so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所需要的.so文件。

所以,在/etc/ld.so.conf中加入/usr/local/lib这一行,保存之后,再运行:/sbin/ldconfig –v更新一下配置即可。

原文地址:https://www.cnblogs.com/cthon/p/9219091.html

时间: 2024-08-16 15:56:44

error while loading shared libraries的解決方法的相关文章

error while loading shared libraries: libevent-2.0.so.5解决办法

CentOS下如何安装libevent 1.下载安装包 新版本是libevent-2.0.10-stable.(如果你的系统已经安装了libevent,可以不用安装)官网:http://www.monkey.org/~provos/libevent/下载:http://www.monkey.org/~provos/libevent-2.0.10-stable.tar.gz 2.解压 # tar zxvf libevent-2.0.10-stable.tar.gz 3.进入目录# cd libev

Nginx 启动出错 error while loading shared libraries: libpcre.so.1

在 centos 6.5  64位上编译安装nginx1.63语法检查出错[root @localhost conf]# /usr/local/nginx/sbin/nginx -t /usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 从错误看出是缺少lib文件导致,进一步

sqlplus: error while loading shared libraries解决方法

dbca建库后sqlplus提示如下 $ sqlplus / as sysdba sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied 解决方法 将selinux功能关掉 root用户 将/etc/selinux/c

error while loading shared libraries: libluajit-5.1.so.2: cannot open shared 解决办法

一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如: tmux: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 原因一般有两个, 一个是操作系统里确实没有包含该共享库(lib*.so.*文件)或者共享库版本不对, 遇到这种情况那就去网上下载并安装上即可. 另外一个原因就是已经安装了该共

/bin/gnugk: error while loading shared libraries: libcrypto.so.0.9.8:

[[email protected] ~]# /bin/gnugk -c /etc/gnugk/gnugk.ini -ttttt -o /var/log/gnugk.log/bin/gnugk: error while loading shared libraries: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory 解决方法: [[email protected] ~]# yum -y

安装了libevent和memcached之后却发现在执行的时候出现了 error while loading shared libraries问题

今天晚上心血来潮装libevent和memcached,可是却出现了奇葩的问题,结果一看越来是引导文件的路径不对! 我遇到  error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory 这样的问题是在安装memcached的时候遇到的. 我按别人的攻略安装了libevent和memcached之后却发现在执行的时候出现了. er

linux下报错:error while loading shared libraries

linux执行bin程序报: error while loading shared libraries:libncurses.so.5: cannot open shared object file: No such file or directory 解决方法: yum -y install libncurses.so.5 安装这个库之后有可能报: error while loading shared libraries:libstdc++so.6: cannot open shared ob

Linux下error while loading shared libraries的解决方法

1. 出现error while loading shared libraries的原因 1-1. 不存在该共享库,如果是这个原因,需要下载或者编译该共享库先了. 1-2. 存在该共享库,但是找不到或者共享库的不对 如果是第二种情况,请继续往下看. 2.原因分析 系统查看共享库的过程:首先查找 /etc/ld.so.cache文件,如果找不到就查找环境变量里的LD_LIBRARY_PATH的值,如果找到了就到对应的目录加载该共享库,如果找不到就报error while loading share

error while loading shared libraries: libtinfo.so.5

想通过ansible在管理的各数据库服务器执行操作数据库的一个shell脚本,跑脚本的时候发现部分服务器能执行成功,部分服务器失败了,报错信息为error while loading shared libraries: libtinfo.so.5. 经过对比,发现执行失败的服务器为centos5的系统.其实系统已经装过ncurses包了,解决方法也简单,只要创建几个软链接就好了. ln -s /usr/lib/libncurses.so.5 /lib64/libtinfo.so.5 ln -s