composer.phar更新不适用于mac

问题描述:

我正在使用mac os x 10.9.5。我直接从网站上下载了composer.phar,因为由于证书问题,我无法通过终端下载它。现在我面对另一个。composer.phar更新不适用于mac

我想使用终端使用下面的命令来更新它:

php composer.phar update

,但它不会工作。

这就是它返回的结果。

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

我不知道它是否连接到第一个问题,但我该如何解决这个问题?任何人都可以教我程序吗?从这里

获取cacert.pem:http://curl.haxx.se/docs/caextract.html

编辑php.ini文件,包括它的路径:

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

你也可以做到这一点的卷发,但它不是必需的作曲家:

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

我如何获得cacert.pem或如何保存它? – darkgraven 2015-06-08 03:29:36

+0

这是我提供的链接: 我们提供自动转换。 PEM格式的输出CA包文件(250KB)可从这里获得: 来自curl.haxx.se的HTTP:[cacert.pem](http://curl.haxx.se/ca/cacert.pem) 来自github的HTTPS:[ca-bundle.crt](https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt) PEM文件包含转换的日期戳,我们尝试仅在脚本或源文件发生更改时才转换。 – ctlq 2015-06-08 13:57:20

+0

我直接从网上保存了cacert.pem,我如何编辑php.ini以包含路径?我可以放在任何地方吗? – darkgraven 2015-06-22 07:19:03