UnexpectedValueException尝试安装laravelcollective时无法解析版本约束 [英] UnexpectedValueException Could not parse version constraint when trying to instal laravelcollective

查看:346
本文介绍了UnexpectedValueException尝试安装laravelcollective时无法解析版本约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是laravel的新手,我正在尝试安装 laravelcollective 。我只是在此处文档中使用,并且正在我的项目目录中使用它:

I am new to laravel and I am trying to install laravelcollective. I am just following to documentation here and I am using this from my project directory:

撰写者需要 laravelcollective / html: ^ 5.4.0

不幸的是,在我按下ent键后,立即出现以下错误:

Unfortunately, immediately after I press ented I get the following error :


[UnexpectedValueException]
无法解析版本约束:5.4.0:无效的版本字符串:5.4.0

[UnexpectedValueException] Could not parse version constraint :5.4.0: Invalid version string ":5.4.0"

我只是不知道如何解决此问题。我在Google上找不到很多东西,再加上缺乏对laravel的经验,这让我陷于困境。

I just don't know how to troubleshoot this. I didn't find much on google and this combined with my lack of experience with laravel leaves me stuck.

有人可以帮忙吗?

推荐答案

您可以在以下位置手动添加 composer.json ,然后使用 composer update

You can add it manually in composer.json then use composer update.

只需在<$ c $的行下添加 laravelcollective / html: 5.4。*, c> laravel / framework: 5.4。*,

Just add "laravelcollective/html": "5.4.*", under the row with "laravel/framework":"5.4.*",

就像这样:

"require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.4.*",
        "laravelcollective/html": "5.4.*", <-- Add this row
        "laravel/tinker": "~1.0"
    },

这篇关于UnexpectedValueException尝试安装laravelcollective时无法解析版本约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆