美文网首页
Mac Protocol “https“ not support

Mac Protocol “https“ not support

作者: 可望不可j | 来源:发表于2021-08-24 23:01 被阅读0次

执行composer update 的时候 报错了

根据错误提示:

查看curl是否支持https:

curl -V

发现是支持https的。

再次测试:

curl https://www.baidu.com

说明curl没有问题,确实支持https访问。

考虑curl支持https所依赖的openssl查看扩展是否开启

php -m

排除此项

然后 phpinfo();

问题锁定

php7.4的 curl扩展不支持 https 需要重装 php7.4的curl扩展

下载curl:https://curl.se/download.html 下载:.tar.gz.zip文件,解压,

我下载的是curl-7.76.1

解压后在当前目录下执行:

./configure --with-php-config=/Applications/MxSrvs/bin/php/bin/php-config --with-darwinssl

为php安装

–with-darwinssl

–with-darwinssl为支持https

编译后可以看到:

然后

make && make install

然后我的是装的集成环境需要,发现集成环境引用curl目录在

cd /Applications/MxSrvs/libs/_curl

然后将刚才编译好的curl,复制到此目录下

cp -r  编译好的文件目录 当前目录/

重启php

打印phpinfo

到此 ok

相关文章

网友评论

      本文标题:Mac Protocol “https“ not support

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