美文网首页
mac 内置与 brew 安装的 openssl 冲突解决方案

mac 内置与 brew 安装的 openssl 冲突解决方案

作者: zzpwestlife | 来源:发表于2016-08-20 17:20 被阅读495次

mac 系统自带的 openssl 信息如下:
Version 0.9.8 - 位于 /usr/bin/openssl
brew 安装的 openssl 信息如下:
Version 1.0.2h_1 - 位于 /usr/local/Cellar/openssl/1.0.2h_1/bin/openssl

terminal 中输入
which openssl或者openssl version
可以看出,都是指向系统默认安装的,现在要做的就是把这个指向改为brew 安装的新版本,也就是 PHP 要进行编译所使用的版本。

方法:建立一个两版本之间的软链
ln -s /usr/local/Cellar/openssl/1.0.2h_1/bin/openssl /usr/bin/openssl
如果上述操作无法执行,只能将原来的 openssl 先重命名,然后建立软链,但这样可能带来稳定性问题。

ln -s /usr/local/Cellar/openssl/1.0.2h_1/bin/openssl /usr/bin/openssl```
但我这里上述两种方式都报错,加 sudo,改权限777也没用。
```Operation not permitted```

###寻求其他解决方案
待添加,一个思路是更改环境变量的路径顺序

相关文章

网友评论

      本文标题:mac 内置与 brew 安装的 openssl 冲突解决方案

      本文链接:https://www.haomeiwen.com/subject/ateisttx.html