运行程序出错无法找到库文件

问题:在运行程序时,报如下故障
./smart_biz: error while loading shared libraries: libredisclient.so: cannot open shared object file: No such file or directory

①库文件不存在,需要添加库文件    ②系统64位,而程序库文件只是32位的

1.查找是否存在该库文件,注:文件权限

find / -name " libredisclient.so"

2.打印可执行档依赖的共享库文件

ldd smart_biz

3.查看该库文件信息

readelf -h /usr/local/lib/libredisclient.so

4.加入需要的苦文件

vi /etc/ld.so.conf 编辑完成后,执行命令:sudo /sbin/ldconf

原文地址:https://www.cnblogs.com/yangg518/p/5586867.html