gpt4 book ai didi

php - 使用 composer-php 的问题

转载 作者:搜寻专家 更新时间:2023-10-31 22:04:55 26 4
gpt4 key购买 nike

每次当我想使用像self-updateinstallupdatecommad 这样的命令时,composer 都会产生这个错误:

[Composer\Downloader\TransportException]                                                   
The "https://getcomposer.org/version" file could not be downloaded: Failed to enable crypto
failed to open stream: operation failed

使用 composer install 我得到这个错误:

The "https://packagist.org/packages.json" file could not be downloaded: 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

我使用的是 php 版本 5.4.9,我的操作系统是 ubuntu 13.04,我的 composer 版本是:

Composer version 80499bb02418711b34bba59c1a6d8032429e5702 2013-12-06 12:32:19

这让我发疯,请帮忙!

这是一个典型的 laravel composer.json 文件:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.0.*"
},
"require-dev": {
"way/guard-laravel": "dev-master"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"

最佳答案

使用 http 作为解决方法。

{
"packagist": false
},
{
"type": "composer",
"url": "http://packagist.org",
"options": {
"ssl": {
"verify_peer": "false"
}
}
}

关于php - 使用 composer-php 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20589076/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com