良玉的博客 点点滴滴,积水成河_良玉的博客_页游、手游linux运维工程师之路

error while loading shared libraries: libevent-1.2.so.1: cannot open shared object file: No such fi

总结下来主要有3种方法:
1. 用ln将需要的so文件链接到/usr/lib或者/lib这两个默认的目录下边
ln -s /where/you/install/lib/*.so /usr/lib
sudo ldconfig


2.修改LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/where/you/install/lib:$LD_LIBRARY_PATH
sudo ldconfig


3.修改/etc/ld.so.conf,然后刷新


vim /etc/ld.so.conf

add /where/you/install/lib

sudo ldconfig



阅读全文...