php - centos 上安装composer失败
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 13:01:13
0
2
1022

服务器上安装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)倒是可以执行,但是好像就不能全局安装了,所以还是想按照文档上的方式执行成功,不知道我该如何解决!

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
Peter_Zhu

Download composer

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

Installation

cp composer.phar /usr/local/bin/composer
chmod u+x /usr/local/bin/composer

Test

composer --help

Use root user when installing, use non-root user when using it

phpcn_u1582

Just install it manually

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template