1

brew如何切换openssl的版本

 2 years ago
source link: http://ocdman.github.io/2020/04/20/brew%E5%A6%82%E4%BD%95%E5%88%87%E6%8D%A2openssl%E7%9A%84%E7%89%88%E6%9C%AC/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

brew如何切换openssl的版本

April 20 2020

最近在学习搭建Solo这个博客服务,在本地运行的时候需要启动MySQL服务。而我的MySQL可能版本比较旧的缘故,版本为5.6,启动的时候报错

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

参考了这篇文章后,原来是MySQL启动的时候需要用到OpenSSL,而我的OpenSSL版本又比较新,是使用brew安装的1.1.1.d版本。在/usr/local/opt/目录下有[email protected][email protected]两个版本,brew默认使用的是1.1这个版本,但MySQL依赖1.0,所以报错。

使用brew switch命令,如果想切到1.0版本的话,执行命令

brew switch openssl 版本号

如果想切换回1.1版本,执行命令

brew switch [email protected] 版本号

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK