Composer-SSL-TLS问题

问题:

1
2
3
4
[Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not availab
le. If you can not enable the openssl extension, you can disable this error
, at your own risk, by setting the 'disable-tls' option to true.

解决方法:

1.启用OpenSSL插件

编辑PHP.ini,开启对应的插件

Linux/OSx:

1
extension=php_openssl.so

Windows:

1
extension=php_openssl.dll

2.禁用TLS

1
composer config -g -- disable-tls true

参考

php - The openssl extension is required for SSL/TLS protection - Stack Overflow