I'm going to be honest with you: I have no idea why this can happen.
This is one of those errors that makes you say "this started to happen out of the sudden and I'm 100% sure I touched nothing". But it's there, and I have a potential solution, hoping you are in a hurry to get it fixed without asking too much questions.
[Composer\Downloader\TransportException] The "https://example:email@example.com/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed
The full error is up there and it appears when you use Composer such as when running
composer install, and it seems to be that your computer is using a wrong (or not up to date?) CA certificate when trying to communicate with a Composer repository.
cacert.pem is a bundle of CA certificates that you use to verify that the server is really the correct site you're talking to (when it presents its certificate in the SSL handshake).
Comment by Daniel Stenberg on Stack Overflow
So, fixing this is quite simple as it only involves replacing the
cacert.pem file with the one you can download here: CA certificates extracted from Mozilla.
If you are using MAMP, chance are that the file you need to replace, locally, is on
/Applications/MAMP/Library/OpenSSL/certs/, but if you are unsure you can open a Terminal and run
locate cacert.pem to get a list of all the places where you can find the Certificate Authority file.
If still unsure about the location of the
cacert.pem you need to replace, check your
php.ini and look for the
[openssl] ; The location of a Certificate Authority (CA) file on the local filesystem ; to use when verifying the identity of SSL/TLS peers. Most users should ; not specify a value for this directive as PHP will attempt to use the ; OS-managed cert stores in its absence. If specified, this value may still ; be overridden on a per-stream basis via the "cafile" SSL stream context ; option. openssl.cafile=path/to/cacert.pem
Finally, remember to restart Apache before trying again.