composer.phar 安装出现PHP Fatal error解决办法

报错:

PHP Fatal error:  Uncaught exception 'PharException' with message 'phar "C:\ProgramData\ComposerSetup\bin\composer.phar" has a broken signature' in C:\ProgramData\ComposerSetup\bin\composer.phar:23

Stack trace:

#0 C:\ProgramData\ComposerSetup\bin\composer.phar(23): Phar::mapPhar('composer.phar')

#1 {main}

  thrown in C:\ProgramData\ComposerSetup\bin\composer.phar on line 23

Fatal error: Uncaught exception 'PharException' with message 'phar "C:\ProgramData\ComposerSetup\bin\composer.phar" has a broken signature' in C:\ProgramData\ComposerSetup\bin\composer.phar:23

Stack trace:

#0 C:\ProgramData\ComposerSetup\bin\composer.phar(23): Phar::mapPhar('composer.phar')

#1 {main}

  thrown in C:\ProgramData\ComposerSetup\bin\composer.phar on line 23

解决:可能是composer.phar文件损坏,可以下载最新文件快照(下载地址:https://getcomposer.org/composer.phar),并覆盖"C:\ProgramData\ComposerSetup\bin\composer.phar"


你可能感兴趣的:(Composer)