linux下,我们通常使用ldd命令查看可执行文件依赖了哪些动态库,以及程序运行时,这些动态库的位置。
比如我在我的centos测试服务器上查看nginx依赖的动态库:
1 | $ldd /usr/sbin/nginx |
MacOS没有ldd,可以通过otool -L
命令达到统一的效果,比如:
1 | otool -L /usr/local/go/bin/go |
以及:
1 | otool -L /usr/local/bin/ffmpeg |
参考链接:
- https://man.linuxde.net/ldd
- https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/ldd.html
- https://discussions.apple.com/thread/309193
本文完,作者yoko,尊重劳动人民成果,转载请注明原文出处: https://pengrl.com/p/20047/
Gitalking ...