zhaoww% brew link openssl --force
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
解决方法:
1.执行
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
2. 执行 brew install openssl
(the 1.0.2 version)
参考链接: https://github.com/dotnet/cli/issues/3964#issuecomment-236485454 (本人电脑不能解决)
用下面方法能够解决:
bash的设置文件:sudo vim ~/.bash_profile
命令为:
export PATH=/usr/local/bin:$PATH
再次查看openssl版本