问题:

运行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. ORM之三:DbProvider与DbFactory

    这里涉及到两个关键对象,一个是DbProvider,另一个就是DbFactory.粗略草图如下:   从上图可以看出,开放给消费者的接口就是DbProvider类,不过他主要继承IDbProvider ...

  2. 设计模式 - 策略模式(Strategy Pattern) 具体解释

    策略模式(Strategy Pattern) 具体解释 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26577879 本文版权全 ...

  3. material-design-library

    https://github.com/DenisMondon/material-design-library

  4. mysql sql语句使用技巧

    mysql更新数据限制limitmysql更新时,要更新记录中某个区间的数据,只能用WHERE条件来限制了,用LIMIT只能限制更新多少条!测试如下:UPDATE products SET goods ...

  5. C#_MVC_Repository_CRUD_Model

    using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace iFlytekDemo ...

  6. Basic Example of JMX Technology--转载

    原文地址:http://nick-lab.gs.washington.edu/java/jdk1.5b/guide/jmx/tutorial/connectors.html Basic Example ...

  7. 去model化开发

    前言 去model化是一种框架设计上的做法,其中的model并不是指架构中的model层,套用Casa大神博客中的原文就是: model化就是使用数据对象,去model化就是不使用数据对象. 常见的去 ...

  8. Asp.Net 之 基本控件FileUpload上传控件

    1.前台代码: <asp:FileUpload ID="FileUpload" runat="server" /> <asp:Button I ...

  9. Java基础知识强化之IO流笔记71:NIO之 NIO的(New IO流)介绍

    1. I/O 简介 I/O ( 输入/输出  ):指的是计算机与外部世界或者一个程序与计算机的其余部分的之间的接口.它对于任何计算机系统都非常关键,因而所有 I/O 的主体实际上是内置在操作系统中的. ...

  10. Android_SeekBar

    xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:too ...