ryanothelo
ryanothelo

Reputation: 1

composer.phar update does not work for mac

I am using mac os x 10.9.5. I downloaded composer.phar directly from the website because i couldn't download it via terminal because of Certificate issues. Now I am facing another one.

I wanted to update it using terminal using the command:

php composer.phar update

, but it won't work.

This is what it returns.

The "https://packagist.org/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 https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date Updating dependencies (including require-dev)

[Composer\Downloader\TransportException]
The //packagist.org/p/symfony/translation$f8eee51c240f90017928c2f65b5601561a2842e02cb97cda1b3a0d7acc039ac8.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

I don't know if it is connected to the first problem but how do i fix this? can anyone teach me the procedures?

Upvotes: 0

Views: 882

Answers (1)

ctlq
ctlq

Reputation: 69

Get cacert.pem from here: http://curl.haxx.se/docs/caextract.html

Edit php.ini to include the path to it:

openssl.cafile=/usr/local/share/cacert.pem

You can also do it for curl but it's not required for composer:

curl.cainfo=/usr/local/share/cacert.pem

Upvotes: 0

Related Questions