Blogger Information
Blog 8
fans 1
comment 0
visits 41314
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
composer 安装扩展失败 报错The openssl extension is required for SSL/TLS protection but is not available
老洪
Original
4187 people have browsed it

一、报错情况:

    在通过 composer 安装扩展 JWT 时,报错:“The openssl extension is required for SSL/TLS protection but is not available”

二、报错分析:

    由于自己本地安装的 WAMP 或 phpstudy ,但 终端(DOS)环境变量中的 php 并非前面那两个,而是另外安装过的php。

从而导致 配置文件 php.ini 里的 openssl 并没有真正开启。

三、处理:

    首先,通过命令:php --ini 查看cli的php.ini文件位置。

    再者,修改此目录里php.ini的配置:   extension=php_openssl.dll

    最后,执行:composer config -g --disable-tls true # 关闭Composer的TLS来修复

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post