首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >我在Laravel5.8应用程序中安装了guzzlehttp/ got时出错了

我在Laravel5.8应用程序中安装了guzzlehttp/ got时出错了
EN

Stack Overflow用户
提问于 2021-03-23 11:24:42
回答 2查看 1.6K关注 0票数 0

我需要在Laravel5.8应用程序中安装guzzlehttp/guzzle来使用条纹,但我得到了

安装错误:

代码语言:javascript
运行
复制
$ composer require guzzlehttp/guzzle
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Using version ^7.2 for guzzlehttp/guzzle
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for php-http/guzzle6-adapter (locked at v1.1.1, required as ^1.0) -> satisfiable by php-http/guzzle6-adapter[v1.1.1].
    - Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[7.3.x-dev, 6.5.x-dev].
    - Conclusion: install guzzlehttp/guzzle 6.5.x-dev
    - Installation request for guzzlehttp/guzzle ^7.2 -> satisfiable by guzzlehttp/guzzle[7.2.0, 7.3.x-dev].

我的composer.json有:

代码语言:javascript
运行
复制
{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2",
        "clarification/sendgrid-laravel-driver": "^2.0",
        "darkaonline/l5-swagger": "5.8.*",
        "fideloper/proxy": "^4.0",
        "jenssegers/agent": "^2.6",
        "laravel/framework": "5.8.38",
        "laravel/tinker": "^1.0",
        "martinlindhe/laravel-vue-i18n-generator": "^0.1.46",
        "paragonie/sodium_compat": "^1.14",
        "php-http/guzzle6-adapter": "^1.0",
        "guzzlehttp/guzzle": "^5.x",
        "pusher/pusher-php-server": "^4.1.1",
        "stripe/stripe-php": "^7.50",
        "tintnaingwin/email-checker": "^2.0",
        "spatie/browsershot": "^3.37",
        "twilio/sdk": "^5.42"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^7.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "files": [
            "app/library/helper.php"
        ],
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

我使用PHP 7.4.15。

怎么能修好呢?

谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-03-23 11:50:26

您必须更新guzzlehttp/guzzle版本,因为它是php版本所要求的。

尝试将"guzzlehttp/guzzle": "^5.x"更改为此"guzzlehttp/guzzle": "^7.2.0",然后运行composer update,您当前的php版本是^7.2

你可以在这里找到更多关于它的https://packagist.org/packages/guzzlehttp/guzzle#6.5.5

票数 1
EN

Stack Overflow用户

发布于 2022-08-28 21:57:52

与最近的版本有冲突,请使用此方法

代码语言:javascript
运行
复制
composer require guzzlehttp/guzzle:^7.0
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66762195

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档