问题:

运行gsl(GNU scientific Library)的函数库,用

gcc erf.c -I/usr/local/include -L/usr/local/lib64 -L/usr/local/lib -g -Wall --std=gnu99 -lgsl -lgslcblas -o m.o

编译,之后运行./m.o

提示error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory

解决方法:

在shell下

ldd m.o

输出:

~/test/c $ldd m.o 
linux-vdso.so.1 => (0x00007fff3d5ff000) 
libgsl.so.0 => not found 
libgslcblas.so.0 => not found 
libc.so.6 => /lib64/libc.so.6 (0x00007f7420c3b000) 
/lib64/ld-linux-x86-64.so.2 (0x00007f7420fdd000)

说明libgsl和libgslcblas.so找不到

sudo ldconfig

ldconfig的作用是:Configure Dynamic Linker Run Time Bindings.

然后再次运行ldd m.o

~/test/c $ldd m.o 
linux-vdso.so.1 => (0x00007fff62bad000) 
libgsl.so.0 => /usr/local/lib/libgsl.so.0 (0x00007f6968a01000) 
libgslcblas.so.0 => /usr/local/lib/libgslcblas.so.0 (0x00007f69687ce000) 
libc.so.6 => /lib64/libc.so.6 (0x00007f6968439000) 
libm.so.6 => /lib64/libm.so.6 (0x00007f69681b5000)

已经成功运行

问题出现原因:

刚刚安装好gsl后,由于gsl的动态链接库没有及时刷新导致识别不到。

动态链接库找不到 : error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory的更多相关文章

  1. nginx检查报错 error while loading shared libraries: libprofiler.so.0: cannot open shared object file: No such file or directory

    在centos7.3上编译安装nginx-1.12.2 启动测试出错 [root@web02 local]# /usr/local/nginx/sbin/nginx -t /usr/local/ngi ...

  2. svnadmin:error while loading shared libraries: libaprutil-1.so.0:cannot open shared object file: No such file or directory

    wdcp下安装svn后一直提示 svnadmin:error while loading shared libraries: libaprutil-1.so.0:cannot open shared ...

  3. ./filezilla: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

    opensuse系统 在filezilla官网下载压缩文件解压运行后报 ./filezilla: error while loading shared libraries: libpng12.so.0 ...

  4. error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file

    安装rac10g,出现例如以下错误: [root@rac2 oracle]# /u01/product/crs/root.sh WARNING: directory '/u01/product' is ...

  5. 运行错误:error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or

    链接时可以通过-L和-l来指定自己的库,因此链接可以通过,但是运行时,系统仍无法找到指定的库,需要简单配置一下. 解决方法: 可以直接在将自己的库所在路径添加到/etc/ld.so.conf文件中.但 ...

  6. opensuse13.1 安装chrome报 error while loading shared libraries:libudev.so.0:cannot open shared object file:no file or directory

    1  opensuse13.1 安装chrome时 先用rpm -ivh --test **.rpm 测试安装  安装上缺少的文件 2 但是安装测试通过 却不能启动 原因 缺少一个文件 libudev ...

  7. error while loading shared libraries: libpcre.so.0的解决办法

    error while loading shared libraries: libpcre.so.0的解决办法 http://blog.csdn.net/xjkwq1qq/article/detail ...

  8. Nginx启动错误:error while loading shared libraries: libpcre.so.0

    今天测试的时候,启动一个其他机器预编译好的nginx到目标测试机器(OEL 7.4)启动的时候,报了下列错误: /usr/local/nginx/sbin/nginx: error while loa ...

  9. gm: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory

    安装gm库产生问题 解决方案: # cat /etc/ld.so.confinclude ld.so.conf.d/*.conf# echo "/usr/local/lib" &g ...

随机推荐

  1. BZOJ 1143: [CTSC2008]祭祀river 最长反链

    1143: [CTSC2008]祭祀river Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline ...

  2. 一个Solr搜索实例,增删改查+高亮+分页

    今天个人coding的模块测试,所以闲暇之余继续研究solr,然后顺带写了一个实例,随便搞的,solr真心不熟,期待认识热爱搜索的朋友,共同进步. 1.配置schema.xml文件[solr\coll ...

  3. [MODx] 8. Snippet get data, chunk display

    Simple Example: Lets process this chunk and output its value. We have this Chunk, called "Welco ...

  4. SQL Server 性能优化3 该指数(Index)保养

    前言 之前的一篇文章介绍了索引来提高数据库的查询性能,这其实仅仅是个开始.也许假设缺乏适当的保养,索引你以前建立的,甚至成为拖累,成为帮凶下降数据库的性能. 寻找碎片 消除碎片索引维护可能是最常规的任 ...

  5. MySQL使用hugepage

    http://blog.csdn.net/dba_waterbin/article/details/9669929http://www.cnblogs.com/LMySQL/p/4689868.htm ...

  6. php输出错误信息

    error_reporting(E_ALL);  ini_set('display_errors','on'); header("Content-Type:text/html;charset ...

  7. 学习jQuery后的部分总结

    1.remove和empty <div id="div1"> <ul id="ul1"> <li>嘿嘿</li> ...

  8. Hibernate - list()和iterate()的区别

    list()和iterate()都可以用来获得Query取得的HQL结果list()使用的是即时加载.查询时会之前去数据库查询HQL并将所有结果存在缓存中.iterate()使用的是延时加载.查询时只 ...

  9. Python基础:1.数据类型(字典)

    提示:python版本:2.7,windows系统 1.字典(Dictionary) 由Key-Value组成,一个Key只能对应一个Value >>> colors = {'red ...

  10. Python 文件操作模块 shutil 详解

    1.导入模块 shutil import shutil 2.shutil方法 2.1 shutil.copy(src,dst) //将 src 复制到 dst 保留文件权限    例:将Alan复制到 ...