Problem description
#php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
PHP 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
PHP Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning: copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1
Solution:
Download certificate http://curl.haxx.se/ca/cacert.pem
wget http://curl.haxx.se/ca/cacert.pem
Or use the web page to download and upload to linux
mkdir -p /usr/local/openssl/ssl/certs/
mv cacert.pem /usr/local/openssl/ssl/certs/cacert.pem
Modify php.ini
;openssl.capath=
openssl.cafile=/usr/local/openssl/ssl/certs/cacert.pem
Problem-solving
Reinstall the composer
Similar Posts:
- Mac Error: Connection to `ssl://pecl.php.net:443′ failed [How to Solve]
- [Solved] CURL Install Error: GnuTLS: The TLS connection was non-properly terminated. Unable to establish SSL connection.
- Curl https Error: curl: (60) Peer certificate cannot be authenticated with known CA certificates
- [Solved] Homebrew curl: (60) SSL certificate problem: certificate has expired
- file_get_Contents and fopen return false when requesting HTTPS address: Error content: SSL routes: ssl3_get_server_certificate:certificate verify failed
- [Solved] Accessing MSSql under Ubuntu prompts SSL Handshake failed with OpenSSL error
- Python Installation WARNING: pip is configured with locations that require TLS/SSL, however the ssl module…
- OS X: equivalent to WGet of Linux
- How to Solve devtools::install_github SSL/TLS connection failed
- Openeuler: How to Install OpenSSL