>백엔드 개발 >PHP 튜토리얼 >composer update时报错:has a broken sugnature

composer update时报错:has a broken sugnature

WBOY
WBOY원래의
2016-06-06 20:44:372031검색

项目使用composer进行包管理,但是进行包升级时报以下错误,该怎么解决?

<code>ubuntu@ubuntu-VGN-SR13-B:~/nginx/coolwifi$ composer selfupdate
PHP Fatal error:  Uncaught exception 'PharException' with message 'phar "/usr/local/bin/composer" has a broken signature' in /usr/local/bin/composer:13
Stack trace:
#0 /usr/local/bin/composer(13): Phar::mapPhar('composer.phar')
#1 {main}
  thrown in /usr/local/bin/composer on line 13
</code>

解决:删掉/usr/local/bin/composer后,重新下载composer.phar复制进去添加执行权限后正常

回复内容:

项目使用composer进行包管理,但是进行包升级时报以下错误,该怎么解决?

<code>ubuntu@ubuntu-VGN-SR13-B:~/nginx/coolwifi$ composer selfupdate
PHP Fatal error:  Uncaught exception 'PharException' with message 'phar "/usr/local/bin/composer" has a broken signature' in /usr/local/bin/composer:13
Stack trace:
#0 /usr/local/bin/composer(13): Phar::mapPhar('composer.phar')
#1 {main}
  thrown in /usr/local/bin/composer on line 13
</code>

解决:删掉/usr/local/bin/composer后,重新下载composer.phar复制进去添加执行权限后正常

看似权限不够,请试试:
> sudo composer self-update
or

<code>> sudo su
> composer self-update
</code>

似乎需要重新安装,请查看 issue on github.

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.