原因:php7.4 curl扩展ssl,https未打开
php7.4的 curl扩展不支持 https 需要重装 php7.4的curl扩展
1.下载curl:https://curl.se/download/
2.下载curl-7.76.1版本,下载高版本我的报错configure: error: select TLS backend(s) or disable TLS with --without-ssl.
3.解压下载文件并进入curl-7.76.1目录
./configure --with-php-config=/Applications/MxSrvs/bin/php/bin/php-config --with-darwinssl
–with-darwinssl为支持https
4. 编译安装
make && make install
5.我的是集成环境MxSrvs
cd /Applications/MxSrvs/libs/_curl
6.将目录7.70.0改成7.70.0_back
7. 重启PHP
参考文章mac解决composer报错:Protocol “https“ not supported or disabled in libcurl_xiadiganhuo的博客-CSDN博客
与之有些许不同