Mac dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
1、首先 移除 openssl:brew remove openssl
2、安装 openssl:brew install openssl
3、根据提示在 ~/.bash_profile 文件中添加如下内容:
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"'
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
4、执行 brew switch openssl 1.0.2s,根据提示修改为:brew switch openssl 1.0.2q,重新执行
5、此时运行 PHP 会提示:dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
6、查看文件夹 ls /usr/local/opt/readline/lib/
7、创建连接
ln -s /usr/local/opt/readline/lib/libreadline.8.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
8、到此恢复。
以上是本人电脑出现此问题的解决步骤
转载: https://blog.csdn.net/qq_18937003/article/details/104210604