error while loading shared libraries: libseaudit.so.4: cannot open shared object file: Error 40

安装共享库后要注意共享库路径设置问题, 如下:

1) 如果共享库文件安装到了/lib或/usr/lib目录下, 那么需执行一下ldconfig命令

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

2) 如果共享库文件安装到了/usr/local/lib(很多开源的共享库都会安装到该目录下)或其它"非/lib或/usr/lib"目录下, 那么在执行ldconfig命令前, 还要把新共享库目录加入到共享库配置文件/etc/ld.so.conf中, 如下:

# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
# echo "/usr/local/lib" >> /etc/ld.so.conf
# ldconfig

3) 如果共享库文件安装到了其它"非/lib或/usr/lib" 目录下, 但是又不想在/etc/ld.so.conf中加路径(或者是没有权限加路径). 那可以export一个全局变量LD_LIBRARY_PATH, 然后运行程序的时候就会去这个目录中找共享库.

LD_LIBRARY_PATH的意思是告诉loader在哪些目录中可以找到共享库. 可以设置多个搜索目录, 这些目录之间用冒号分隔开. 比如安装了一个mysql到/usr/local/mysql目录下, 其中有一大堆库文件在/usr/local/mysql/lib下面, 则可以在.bashrc或.bash_profile或shell里加入以下语句即可:

export LD_LIBRARY_PATH=/usr/local/mysql/lib:$LD_LIBRARY_PATH

一般来讲这只是一种临时的解决方案, 在没有权限或临时需要的时候使用.

--End--

时间: 2024-10-14 14:05:34

error while loading shared libraries: libseaudit.so.4: cannot open shared object file: Error 40的相关文章

启动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

error while loading shared libraries: libiksemel.so.3: cannot open shared...

zabbix服务启动出问题 报错:error while loading shared libraries: libiksemel.so.3: cannot open shared ... 解决办法: 执行 ldconfig

gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory

org.im4java.core.CommandException: org.im4java.core.CommandException: /usr/local/bin/gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory 原因:GraphicsMagick-LATEST17.tar.gz 安装 错误,无法访问libpn

error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such

启动zabbix_server出现如题错误,差点没晕死过去,从前一直没出现,这种错误其实工作上已经遇到过无数次了,但是每次的没有好好记录总结一些,导致每次遇到都需要傻乎乎的跑到网上->百度,方可解决.今天特地针对这个小问题写一篇错误记录博客,日后遇到方可快速查看. 执行命令 cd /usr/local/mysql/lib/ ll libmysqlclient.so 发现有  libmysqlclient.so -> libmysqlclient.so.18 于是 ln -s /usr/loca

error while loading shared libraries: libssl.so.6: cannot open shared object file

[[email protected] ~]# /usr/local/nagios/libexec/check_tcp -H 127.0.0.1 80 /usr/local/nagios/libexec/check_tcp: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory 关联库文件:发现libssl.so.6 => not fo

error while loading shared libraries: libpcre.so.1: cannot open shared object file

执行启动nginx:/usr/local/nginx/sbin/nginx 错误:/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 查找:[[email protected] lib]# find /-type f -name *libpcre.so.* 执行:[[ema

centos6.9安装xampp后报错:egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

1.centos6.9安装xampp(xampp-linux-x64-7.0.21-0-installer.run)后启动的时候,报错: egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directoryegrep: error while loading shared libraries: libc.so.6: cannot open

error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file

安装rac10g,出现如下错误: [[email protected] oracle]# /u01/product/crs/root.sh WARNING: directory '/u01/product' is not owned by root Checking to see if Oracle CRS stack is already configured /etc/oracle does not exist. Creating it now. Setting the permission

error while loading shared libraries: libreadline.so.5: cannot open shared object file:

错误信息: ftp: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory 解决办法: yum install -y readline-devel readline [[email protected] ~]# cd /usr/lib64/ [[email protected] lib64]# ll *libreadline