error while loading shared libraries: libmemcached.so.11: cannot open shared object file: No such file or directory

在使用libmemcached库的时候出现如下错误

error while loading shared libraries: libmemcached.so.11: cannot open shared object file: No such file or directory

出现上述错误一般是没有设置memcached环境变量

运行过程中,需要将libmemcached.so文件所在目录加入到变量LD_LIBRARY_PATH中,即export LD_LIBRARY_PATH=/usr/local/libmemcached/lib:$LD_LIBRARY_PATH,否则运行时会提示类似错误

你可能感兴趣的:(error while loading shared libraries: libmemcached.so.11: cannot open shared object file: No such file or directory)