MacOS系统 homebrew
命令行进入mysql 报错如下:
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/opt/mysql@5.7/bin/mysql
Reason: image not found
Abort trap: 6
亲测有效:终端命令行输入
sudo install_name_tool -change /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/libssl.1.1.dylib $(which vapor)
sudo install_name_tool -change /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/libcrypto.1.1.dylib $(which vapor)
切换到老版本的ssl(1.0.2s):
brew switch openssl 1.0.2s
如果之前安装的是其它版本号,会提示。例如:
此时只需重新输入对应版本号即可:
brew switch openssl 1.0.2q
这样就可以正常运行mysql了!