当前位置: 代码迷 >> 综合 >> composer报错:Fatal error: Uncaught PharException: phar “/usr/local/bin/composer“ has a broken signatu
  详细解决方案

composer报错:Fatal error: Uncaught PharException: phar “/usr/local/bin/composer“ has a broken signatu

热度:17   发布时间:2023-12-09 10:56:01.0

报错内容:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer

PHP Fatal error: Uncaught PharException: phar “/usr/local/bin/composer” has a broken signature in /usr/local/bin/composer:23
Stack trace:
#0 /usr/local/bin/composer(23): Phar::mapPhar(‘composer.phar’)
#1 {main}
thrown in /usr/local/bin/composer on line 23

是composer.phar文件损坏,重新下载即可

wget https://getcomposer.org/composer.phar

  相关解决方案