macOS报错提示

报错内容

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

欢迎交流 [email protected]

你可能感兴趣的:(macOS报错提示)