linux编译找不到库:error while loading shared libraries: libevent-2.2.so.1: cannot open shared object file: No such file or directory

首先查找库文件是否存在

sudo find / -name libevent-2.2.so.1

 

结果发现在

/usr/local/lib/libevent-2.2.so.1

 

建立软链接:

 sudo ln -s /usr/local/lib/libevent-2.2.so.1 /usr/lib/libevent-2.2.so.1

 

解决~

 

【转】:https://www.cnblogs.com/chendaye666/p/13210513.html

linux编译找不到库:error while loading shared libraries: libevent-2.2.so.1: cannot open shared object file: No such file or directory

上一篇:Linux定时删除指定目录下文件


下一篇:Redis的安装--Linux系统(CentOS 7)