Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Composer在XAMPP上安装OS X Laravel失败_Laravel_Composer Php - Fatal编程技术网

使用Composer在XAMPP上安装OS X Laravel失败

使用Composer在XAMPP上安装OS X Laravel失败,laravel,composer-php,Laravel,Composer Php,我已经安装了Laravel文档指示的composer。然后,我运行以下命令来instal Laravel:composer创建项目Laravel/Laravel您的项目名称--首选dist 我得到以下信息: The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:140900

我已经安装了Laravel文档指示的composer。然后,我运行以下命令来instal Laravel:
composer创建项目Laravel/Laravel您的项目名称--首选dist

我得到以下信息:

    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
Installing laravel/laravel (v5.1.4)
  - Installing laravel/laravel (v5.1.4)
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/901a45fd96a7479e77f63ea5f8d1147a2766cafa" 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
    Now trying to download from source
  - Installing laravel/laravel (v5.1.4)
    Cloning 901a45fd96a7479e77f63ea5f8d1147a2766cafa

Created project in your-project-name
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
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
Installing dependencies (including require-dev)
  - Installing vlucas/phpdotenv (v1.1.1)
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Failed to download vlucas/phpdotenv from dist: The "https://api.github.com/repos/vlucas/phpdotenv/zipball/0cac554ce06277e33ddf9f0b7ade4b8bbf2af3fa" 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
    Now trying to download from source
  - Installing vlucas/phpdotenv (v1.1.1)
    Cloning 0cac554ce06277e33ddf9f0b7ade4b8bbf2af3fa

  - Installing symfony/var-dumper (v2.7.3)
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Failed to download symfony/var-dumper from dist: The "https://api.github.com/repos/symfony/var-dumper/zipball/e8903ebba5eb019f5886ffce739ea9e3b7519579" 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
    Now trying to download from source
  - Installing symfony/var-dumper (v2.7.3)
    Cloning e8903ebba5eb019f5886ffce739ea9e3b7519579

  - Installing symfony/translation (v2.7.3)
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Failed to download symfony/translation from dist: The "https://api.github.com/repos/symfony/Translation/zipball/c8dc34cc936152c609cdd722af317e4239d10dd6" 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
    Now trying to download from source
  - Installing symfony/translation (v2.7.3)
    Cloning c8dc34cc936152c609cdd722af317e4239d10dd6

  - Installing symfony/routing (v2.7.3)
    Downloading: 100%         
    Downloading: 100%         
    Downloading: 100%         
    Failed to download symfony/routing from dist: The "https://api.github.com/repos/symfony/Routing/zipball/ea9134f277162b02e5f80ac058b75a77637b0d26" 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
    Now trying to download from source
  - Installing symfony/routing (v2.7.3)
    Cloning ea9134f277162b02e5f80ac058b75a77637b0d26
所以,首先它说它没能做到这些,然后它说安装、克隆等等。我检查了文件夹
你的项目名称
,它有190MB的内容。那么它是否有效?如果没有,我如何解决此问题

我正在运行OSXMavericks和PHP5.6+

我看了其他答案,但似乎没有一个适合我的系统。

试试这个

composer create-project laravel/laravel c:/xampp/htdocs/laravel
-这里的路径是(c:/xampp/htdocs/laravel),所以将其更改为您的路径

-如果不工作,那么您必须重新安装ca证书包,它将
解决了这个问题

我通过自制软件安装openssl:

brew install openssl
这会将openssl证书安装到/usr/local/etc/openssl/cert.pem,因此我们现在可以使用新的PHP 5.6 INI设置openssl.cafile告诉PHP在哪里可以找到证书:

添加

openssl.cafile=/usr/local/etc/openssl/cert.pem

我如何安装这些证书?我通过自制程序安装openssl:brew安装openssl这将openssl证书安装到/usr/local/etc/openssl/cert.pem,因此,我们现在可以使用新的PHP5.6INI设置openssl.cafile告诉PHP在哪里可以找到证书:添加openssl.cafile=/usr/local/etc/openssl/cert.pem在El Capitan上工作时,packagist突然在composer update上出错,必须执行这些步骤。我怀疑苹果公司的后台更新安装了自己的SSL,从而影响了这一点。