使用动态链接库的时候经常挂不上,出现类似下面的错误:
error while loading shared libraries: libgsl.so.19: cannot open shared object file: No such file or directory
有两种解决方安:
(1)配置环境变量
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
(2)修改系统动态链接库配置
Review your /etc/ld.so.conf. If /usr/local/lib is not listed there, add it. Now, run ldconfig to detect the shared object file and add it to some system-wide index.