报错内容
user:~ sl$ wget https://pecl.php.net/get/yaml-2.0.4.tgz
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/wget
Reason: image not found
Abort trap: 6
user:~ sl$ whereis wget
user:~ sl$ which wget
/usr/local/bin/wget
user:~ sl$ ls /usr/local/opt/openssl/lib/
engines-1.1 libcrypto.a libssl.1.1.dylib libssl.dylib
libcrypto.1.1.dylib libcrypto.dylib libssl.a pkgconfig
分析问题
系统 macOS Mojave,执行wget报错提示image not found,但实际上是有 libssl,只是版本不对,版本是 1.1.1。系统是之前有升级过,这个没切换过来。
解决办法
user:~ sl$ brew switch openssl 1.0.2r
Error: openssl does not have a version "1.0.2r" in the Cellar.
openssl installed versions: 1.1.1d
user:~ sl$ brew switch openssl 1.1.1d
欢迎交流 coconets@163.com
本文记录了在macOS Mojave系统中使用wget命令遇到的依赖库版本不匹配问题,具体表现为dyld无法加载正确的libssl库版本。文章详细分析了问题原因,并提供了具体的解决方案,包括如何正确切换openssl版本。
1119

被折叠的 条评论
为什么被折叠?



