小编给大家分享一下怎么解决composer failed to open stream: Operation now in progress错误的问题,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
最近遇到一个问题,一直不知道如何解决,网上搜到很多方法,都没效果
一开始以为是不支持ssl ,检查发现是支持的
php -i | grep -i sslSSL => YesSSL Version => OpenSSL/1.0.2rcore SSL => supportedextended SSL => supportedopensslOpenSSL support => enabledOpenSSL Library Version => OpenSSL 1.0.2r 26 Feb 2019OpenSSL Header Version => OpenSSL 1.0.2q 20 Nov 2018Openssl default config => /usr/local/etc/openssl/openssl.cnfopenssl.cafile => /usr/local/etc/openssl/cacert.pem => /usr/local/etc/openssl/cacert.pemopenssl.capath => /usr/local/etc/openssl => /usr/local/etc/opensslSSL support => enabledOpenSSL support => enabled
后来看有人说要更新ssl 秘钥
wget http://curl.haxx.se/ca/cacert.pem
然后在php.ini 配置
curl.cainfo=/usr/local/etc/openssl/cacert.pemopenssl.cafile=/usr/local/etc/openssl/cacert.pemopenssl.capath=/usr/local/etc/openssl
都没什么效果,看来并不是因为这些
执行composer diagnose 之后结果
composer diagnose
然后逐个解决错误吧,首先是github fail 了,网上google 了下,发现需要设置一个token ,之前怎么不需要呢 ,也是奇怪,那先试试
composer config --global github-oauth.github.com <token>or//在composer.json 里加入"github-oauth":{ "github.com":"{token}" //替换成自己token}
token 生成在 https://github.com/settings/t...
执行composer diagnose
Checking composer.json: WARNINGrequire.illuminate/redis : unbound version constraints (*) should be avoidedChecking platform settings: OKChecking git settings: OKChecking http connectivity to packagist: OKChecking https connectivity to packagist: OKChecking github.com rate limit: OKChecking disk free space: OKChecking pubkeys:Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952OKChecking composer version: OKComposer version: 1.8.4PHP version: 7.1.19PHP binary path: /usr/bin/php
搞定!
看完了这篇文章,相信你对“怎么解决composer failed to open stream: Operation now in progress错误的问题”有了一定的了解,如果想了解更多相关知识,欢迎关注编程网行业资讯频道,感谢各位的阅读!