php - Installing composer on centos failed
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 13:01:13
0
2
1054

The installation of composer on the server always fails. It seems that the verification fails. I don’t know how to solve it. I followed the official documentation and the process is as follows:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php

The execution fails after reaching this point, and the following error is reported

Downloading...
Signature mismatch, could not verify the phar file integrity
Retrying...

After a while the error message changes to the following

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.

Then it stopped. So helpless, I tried many times but still the same thing.
I can directly download the executable file (composer.phar) and it can be executed, but it seems that it cannot be installed globally, so I still want to execute it successfully according to the method in the document. I don’t know how I can solve it!

过去多啦不再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