netcdf 编译程序完成后,遇到`error while loading shared libraries: libnetcdff.so.7: cannot open shared object

netcdf 编译程序完成后,遇到error while loading shared libraries: libnetcdff.so.7: cannot open shared object file: No such file or directory
1)找到libnetcdff.so.7,例如我在上节配置netcdf时,输入/usr/local/netcdf/bin/nf-config --all发现lib在--flibs -> -L/usr/local/netcdf/lib -lnetcdff -L/usr/local/netcdf/lib -lnetcdf -lnetcdf -ldl -lm
2)进入/usr/local/netcdf/lib复制文件libnetcdff.so.7/usr/local/lib/

root@yons-System-Product-Name:/usr/local/lib# cp /home/yons/桌面/so/libnetcdff.so.7 /usr/local/lib/
root@yons-System-Product-Name:/usr/local/lib# ls
libnetcdff.so.7  python3.8  tencent-qq

3)出现这个问题就是默认路径/usr/local/lib/找不到文件,copy过来即可

你可能感兴趣的:(教程,服务器,运维)