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
标签:pc1,file,such,test,shared,root,out From: https://www.cnblogs.com/liujiaxin2018/p/17755975.html