小編給大家分享一下怎么解決composer failed to open stream: Operation now in progress錯誤的問題,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
創(chuàng)新互聯(lián)主營西烏珠穆沁網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,重慶APP開發(fā)公司,西烏珠穆沁h5微信小程序開發(fā)搭建,西烏珠穆沁網(wǎng)站營銷推廣歡迎西烏珠穆沁等地區(qū)企業(yè)咨詢
最近遇到一個問題,一直不知道如何解決,網(wǎng)上搜到很多方法,都沒效果
一開始以為是不支持ssl ,檢查發(fā)現(xiàn)是支持的
php -i | grep -i ssl SSL => Yes SSL Version => OpenSSL/1.0.2r core SSL => supported extended SSL => supported openssl OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.0.2r 26 Feb 2019 OpenSSL Header Version => OpenSSL 1.0.2q 20 Nov 2018 Openssl default config => /usr/local/etc/openssl/openssl.cnf openssl.cafile => /usr/local/etc/openssl/cacert.pem => /usr/local/etc/openssl/cacert.pem openssl.capath => /usr/local/etc/openssl => /usr/local/etc/openssl SSL support => enabled OpenSSL support => enabled
后來看有人說要更新ssl 秘鑰
wget http://curl.haxx.se/ca/cacert.pem
然后在php.ini 配置
curl.cainfo=/usr/local/etc/openssl/cacert.pem openssl.cafile=/usr/local/etc/openssl/cacert.pem openssl.capath=/usr/local/etc/openssl
都沒什么效果,看來并不是因為這些
執(zhí)行composer diagnose 之后結(jié)果
composer diagnose
然后逐個解決錯誤吧,首先是github fail 了,網(wǎng)上google 了下,發(fā)現(xiàn)需要設(shè)置一個token ,之前怎么不需要呢 ,也是奇怪,那先試試
composer config --global github-oauth.github.comor //在composer.json 里加入 "github-oauth":{ "github.com":"{token}" //替換成自己token }
token 生成在 https://github.com/settings/t...
執(zhí)行composer diagnose
Checking composer.json: WARNING require.illuminate/redis : unbound version constraints (*) should be avoided Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK Checking github.com rate limit: OK Checking disk free space: OK Checking pubkeys: Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642 Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952 OK Checking composer version: OK Composer version: 1.8.4 PHP version: 7.1.19 PHP binary path: /usr/bin/php
搞定!
看完了這篇文章,相信你對“怎么解決composer failed to open stream: Operation now in progress錯誤的問題”有了一定的了解,如果想了解更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!