美文网首页
composer 报错

composer 报错

作者: DeanWang | 来源:发表于2021-05-14 01:26 被阅读0次

    晚上 composer require monolog/monolog 失败后,所有composer install / composer update 都失败;
    一直报如下错误

    https://mirrors.aliyun.com/composer could not be fully loaded (curl error 61 while downloading https://mirrors.aliyun.com/composer/p2/guzzlehttp/guzzle.json: Error while processing content unencoding: Unknown failure within decompression software.), package information was loaded from the local cache and may be out of date
    
                                                                                                                                                  
      [Composer\Downloader\TransportException]                                                                                                    
      curl error 61 while downloading https://mirrors.aliyun.com/composer/p2/guzzlehttp/guzzle.json: Error while processing content unencoding:   
      Unknown failure within decompression software.                                                                                              
    

    机器PHP版本7.1,require monolog/monolog 默认会引入2.0版本,而2.0版本需要PHP7.2以上,本地PHP版本不满足要求,怀疑在执行的时候缓存了错误的decompression包

    执行 composer clear-cache 后恢复;改为引用monolog1.0版本 "monolog/monolog": "~1.0" 后正常

    相关文章

      网友评论

          本文标题:composer 报错

          本文链接:https://www.haomeiwen.com/subject/vyufjltx.html