服务器上安装composer总是失败,貌似是验证失败,不知道该怎么解决。我是按照官方文档操作的,过程如下:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
执行到这里之后就不行了,报如下错误
Downloading...
Signature mismatch, could not verify the phar file integrity
Retrying...
过一会之后错误信息变成下面这样
Downloading...
Signature mismatch, could not verify the phar file integrity
Retrying...
The "https://getcomposer.org/download/1.4.1/composer.phar" file could not be downloaded: >failed to open stream: HTTP request failed!
Retrying...
Signature mismatch, could not verify the phar file integrity
The download failed repeatedly, aborting.
然后就停止了。好无奈,试了很多遍都一样。
我直接下载执行文件(composer.phar)倒是可以执行,但是好像就不能全局安装了,所以还是想按照文档上的方式执行成功,不知道我该如何解决!
Download composer
Installation
Test
Use root user when installing, use non-root user when using it
Just install it manually