PHP

composer更新报错

今天服务器安装一个composer包时影响了原本的系统,easywechat全部挂掉了。
然后我把composer.json改了,执行composer update命令,发现报了下面的错误

[Composer\Downloader\TransportException]
The "https://mirrors.aliyun.com/composer/p/symfony/polyfill-php70%243836b350fa476514998b891c4b6502d8bdb00a91f4bc9ae5265a5cef28ada562.json" file could not be downloaded (HTTP/1.1 404 Not Found)

然后我把composer的缓存清掉,执行下面的命令

composer clearcache

出现以下提示表示成功了

Cache directory does not exist (cache-vcs-dir): 
Clearing cache (cache-repo-dir): /root/.cache/composer/repo
Clearing cache (cache-files-dir): /root/.cache/composer/files
Clearing cache (cache-dir): /root/.cache/composer
All caches cleared.

最后我再执行更新命令composer update,一大串代码滚动之后,显示成功了

Writing lock file
Generating autoload files
Endroid Installer detected project type "all"

回过头看看原本系统也正常了...

类似文章