我已经安装了作为Laravel文档指示的作曲家。然后我运行以下命令来安装Laravel:composer create-project laravel/laravel your-project-name --prefer-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
首先,它说它没有做到,但它说安装,克隆等。我检查文件夹your-project-name
,它有190MB的东西。它的工作与否也是如此?如果不是,我该如何解决这个问题?
我正在运行OS X Mavericks和PHP 5.6 +
我查看了其他答案,但似乎没有一个适用于我的系统。
答案 0 :(得分:1)
我通过自制软件安装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
答案 1 :(得分:0)
试试这个
composer create-project laravel/laravel c:/xampp/htdocs/laravel
- 这条路径是(c:/ xampp / htdocs / laravel),所以改成你的路径。
- 如果不行,那么你必须重新安装ca-cert包,它会 解决了这个问题!