2017-04-05 90 views
-4

我已经安装了Laravel,现在我想创建一个命令项目(laravel新的文件夹名),但我得到的错误是这样的:创建laravel项目

[GuzzleHttp\Exception\RequestException] 

    No system CA bundle could be found in any of the the common system locations. 
    PHP versions earlier than 5.6 are not properly configured to use the system's 
    CA bundle by default. In order to verify peer certificates, you will need to 
    supply the path on disk to a certificate bundle to the 'verify' request 
    option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not 
    need a specific certificate bundle, then Mozilla provides a commonly used CA 
    bundle which can be downloaded here (provided by the maintainer of cURL): 
    https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once 
    you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP 
    ini setting to point to the path to the file, allowing you to omit the 'verify' 
    request option. 

我需要帮助,请...

+0

你安装了什么版本的PHP? – Mick

+0

PHP版本5.4.12 –

回答

-1

我认为这是一个Guzzle问题,而不是一个纯粹的问题。无论如何尝试这一点。

1-下载此文件https://curl.haxx.se/ca/cacert.pem并将其保存在您的计算机中的某个位置。例如c:/xampp/cacert.pem

2 - 打开你的php.ini配置文件

3-查找以下的配置,如果它存在取消注释或添加它,如果它不:

[curl] 
curl.cainfo=c:/xampp/cacert.pem 
+0

我使用Windows 10和Wamp服务器 –

+0

无论您使用什么样的功放软件,它都是关于php本身。我正在使用win10和xampp,并使用安装程序设置一个新的laravel项目 - 就像你做的那样 - 在php 5.6 –

-1

Laravel是有据可查的,我会建议你去通过文档首先安装过程。有几个基本的要求需要满足:

  • PHP> = 5.6.4
  • OpenSSL的PHP​​扩展
  • PDO PHP扩展
  • MBSTRING PHP扩展
  • 分词PHP扩展
  • XML PHP Extension

https://laravel.com/docs/5.4

你的问题被否决,因为你没有清楚地解释你的问题。根据我的理解,您希望通过命令创建项目,如作曲者create-project {项目名称}

与laravel通过命令创建项目无关。作曲家正在为我们做所有这些事情。首先安装composer,然后尝试使用composer create-project命令创建项目。

+0

https://laravel.com/docs/5.4/installation上没有问题,您可以使用Laravel创建一个项目安装者:laravel新博客。他只需要升级他的PHP版本。 – Mick

+0

@ mick是的,你是对的。我们可以用laravel命令行创建项目。但是我在回答中提到这个问题并不是很清楚,这就是为什么我建议他使用作曲家,而且我也提到了Laravel的基本要求。不幸的是,我输入了答案,并在发布我的答案后看到了您的回复。 – Muhammad