时间: 2018-03-17|627次围观|0 条评论

安装好Composer时通过composer install,发现没有正常安装,而是提示:

[Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not available. 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. composer config -g -- disable-tls true

之后我再次尝试,然后又说php.ini没有开启扩展

D:\soft\WWW\payoujia>composer update
You are running Composer with SSL/TLS protection disabled.
Loading composer repositories with package information
[RuntimeException]
You must enable the openssl extension in your php.ini to load information f
rom https://packagist.phpcomposer.com

 

之前是因为我切换过php版本,从5.3切换到7.0,所以php.ini文件换了

然后就可以顺利下载文件了

D:\soft\WWW\payoujia>composer update
You are running Composer with SSL/TLS protection disabled.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 14 installs, 0 updates, 0 removals
- Installing aliyuncs/oss-sdk-php (dev-master 339a402): Cloning 339a4021da from cache
- Installing entere/sign (v1.0.0): Downloading (100%)
- Installing firebase/php-jwt (v5.0.0): Downloading (100%)
- Installing zeonwang/aliyun-dysms-php-sdk (v1.0): Downloading (connecting...)Downloading (100%)
- Installing symfony/polyfill-mbstring (dev-master 78be803): Cloning 78be803ce0 from cache
- Installing symfony/translation (v3.3.6): Downloading (100%)
- Installing nesbot/carbon (1.24.2): Downloading (100%)
- Installing psr/http-message (dev-master f6561bf): Cloning f6561bf28d from cache

 

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《composer update 不成功
   

还没有人抢沙发呢~