[原创] MacOS的ssh命令报错:Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

MacOS执行一个连接远程服务器的命令 ssh root@192.168.10.78 "mkdir -p /data" 命令时,报错:

dyld[52840]: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
  Referenced from: <此处内容省略> /usr/local/Cellar/openssh/7.8p1/bin/ssh
  Reason: tried: '/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib' (no such file), '/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib' (no such file), '/usr/local/lib/libcrypto.1.0.0.dylib' (no such file), '/usr/lib/libcrypto.1.0.0.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.1.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.1.0.0.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.0_1/lib/libcrypto.1.0.0.dylib' (no such file), '/usr/local/lib/libcrypto.1.0.0.dylib' (no such file), '/usr/lib/libcrypto.1.0.0.dylib' (no such file, not in dyld cache)
这个问题可能是因为OpenSSH版本旧导致的。可以尝试更新OpenSSH来解决:

brew update
brew upgrade openssh

重试,如果仍然报错,可能要尝试重新安装OpenSSH了:

brew uninstall --ignore-dependencies openssh
brew install openssh

文章来源:https://www.codelast.com/
➤➤ 版权声明 ➤➤ 
转载需注明出处:codelast.com 
感谢关注我的微信公众号(微信扫一扫):
wechat qrcode of codelast
以及我的微信视频号:

发表评论