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
- shared file directory libraries loadingshared file directory libraries shared file libraries loading shared permission libraries loading shared libraries loading libxml2 shared libreadline libraries loading shared libraries loading libpcre shared file ogg_linux_x directory shared mysql file directory 细节library语言shared glibcxx library unable shared