composer: OpenSSL Error
Hello,
I’m on macOS Sierra with cmd
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
getting
`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`
any idea how to fix this?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (1 by maintainers)
@Hannover86 try with
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
I’m on MacOs sierra also with PHP 5.6.24You can use
http://
instead of https if that helps, it doesn’t really matter as long as you verify the hash of the file is valid (which is the next line in the setup instructions).Aside from that, it seems to be a php configuration error or you have an outdated version of the openssl extension/lib. Composer might be able to work around that though, once installed. If not then you’ll have to resolve it.
hi, use this :
php -r “copy(‘http://getcomposer.org/installer’, ‘composer-setup.php’);” php composer-setup.php --disable-tls
work for me .
Thanks to all the friends who helped me solve my problems .
@Seldaek @Henriquedrdc some OpenSSL output from
php -I
openssl
OpenSSL support => enabled
OpenSSL Library Version => LibreSSL 2.2.7
OpenSSL Header Version => LibreSSL 2.2.7
Openssl default config => /usr/local/libressl/etc/ssl/openssl.cnf
Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value
For installing composer inside a docker ubuntu image, to just need to install the ca-certificates package to make it work.
Same error here. This issue should not have been closed as the documentation on the download page has not been updated to include mentioning that an http alternative is also available in case the certificate verification fails.
Same error. Use of http instead of https also solve the problem. Using Sierra and PHP 5.6.24.
Mac OS Sierra here too, same error. Using
php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
worked.After updating to MacOs sierra I had the same problem. Thanks @sger for solving my problem.