安装好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.
对于这个问题,我尝试使用下面的命令解决:
- 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
还没有人抢沙发呢~