Linux composer安装错误“需要openssl扩展名”

时间:2018-11-09 06:58:16

标签: php linux composer-php

我已经使用了“ composer install”命令,并且显示为

[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. 

我在Linux操作系统上使用php 7.2

我该如何解决?

我已经在php.ini中查看了,看不到openssl的扩展名。

1 个答案:

答案 0 :(得分:0)

禁用SSL / TLS保护是不安全的。但是如果您对工作环境有足够的信心,请尝试此操作。

composer config -g -- disable-tls true

然后

composer install