Skip to content
Advertisement

Problems with installing composer

I am currently trying to install composer in order to install laravel.

Following their website instructions, I am entering the following code into my terminal:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

But without success, I get the following error:

Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in Command line code on line 1

Warning: copy(): Failed to enable crypto in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

This gives me the notion that I do not have permission to do this, is this the reason and why is it occurring?

Advertisement

Answer

While I was not able to figure out why their particular code did not work. I got composer installed by manually installing the installer instead of relying on a request from their website.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement