./a.out: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory

 

001、问题: ./a.out: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory

 

002、解决方法

复制代码
[root@pc1 test]# ls
a.c
[root@pc1 test]# gcc -I/usr/local/include/gsl -lgsl -lgslcblas a.c
[root@pc1 test]# ls
a.c  a.out
[root@pc1 test]# ./a.out
./a.out: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory
[root@pc1 test]#
[root@pc1 test]# echo "/usr/local/lib" >> /etc/ld.so.conf       ## 修改配置文件
[root@pc1 test]# ldconfig                                       ## 更新配置文件
[root@pc1 test]# ./a.out
Segmentation fault (core dumped)
复制代码

 

 

参考:

https://blog.csdn.net/qq_36748248/article/details/110672626

 

posted @   小鲨鱼2018  阅读(282)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2022-10-10 关闭anaconda3 默认自动启动的命令
2022-10-10 github.com[0: 192.30.255.113]: errno=Connection refused
2022-10-10 centos7 中安装java8
2022-10-10 configure: error: HTSlib development files not found
2022-10-10 configure: error: htscodecs submodule files not present.
2022-10-10 utils.c:33:18: fatal error: zlib.h: No such file or directory
2021-10-10 ubuntu中root用户在图形界面登录
点击右上角即可分享
微信分享提示