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!
天蓬老师2017-05-16 13:03:13
wget https://getcomposer.org/composer.phar
cp composer.phar /usr/local/bin/composer
chmod u+x /usr/local/bin/composer
composer --help
Use root user when installing, use non-root user when using it