openssl 版本导致的 macOS mysql 启动错误

Spoony 54.35m2021-01-161048 次点击
brew install python3 安装 python3 后导致 openssl 升级到1.1,但 mysql 还是依赖的1.0.0,从而导致启动 mysql 时提示
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

解决办法:
使用 brew switch openssl 1.0.2s

```
$ sudo mysql.server start
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/mysql/5.7.18_1/bin/my_print_defaults
Reason: image not found
Starting MySQL
.dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/mysql/5.7.18_1/bin/my_print_defaults
Reason: image not found
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/mysql/5.7.18_1/bin/my_print_defaults
Reason: image not found
/usr/local/Cellar/mysql/5.7.18_1/bin/mysqld_safe: line 196: 45456 Abort trap: 6 nohup /usr/local/Cellar/mysql/5.7.18_1/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.7.18_1 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mysql/5.7.18_1/lib/plugin --user=mysql --log-error=/usr/local/var/mysql/MacBook-Pro.local.err --pid-file=/usr/local/var/mysql/MacBook-Pro.local.pid < /dev/null > /dev/null 2>&1
ERROR! The server quit without updating PID file (/usr/local/var/mysql/MacBook-Pro.local.pid).
```
```
$ brew switch openssl 1.0.2s
Warning: Calling `brew switch` is deprecated! Use `brew link` @-versioned formulae instead.
Cleaning /usr/local/Cellar/openssl/1.0.2s
Opt link created for /usr/local/Cellar/openssl/1.0.2s
$ sudo mysql.server start
Starting MySQL
.2021-01-16T04:16:35.6NZ mysqld_safe A mysqld process with pid=46440 is already running. Aborting!!
SUCCESS!
```
收藏 ♥ 感谢
暂无回复

登录注册 后可回复。