Laravel PHP版本
当我检查PHP版本时,它显示了8.0.3,但我将版本更改为Laragon中的7.2.0。 当我在Laravel中运行Composer Update命令时,会生成错误
问题1
- root Composer.json需要PHP ^7.2.0,但是您的PHP版本(8.0.3)不满足该要求。
问题2
- laravel/框架[v5.8.0,...,5.8.x -dev]要求php ^7.1.3 - >您的PHP版本(8.0.3)无法满足该要求。
- root Composer.json需要Laravel/Framework 5.8。* - >可以通过Laravel/Framework [V5.8.0,...,5.8.x-dev]满足。
when I check my PHP version it shows 8.0.3 but I changed the version to 7.2.0 in Laragon.
when I run the composer update command in Laravel it generates the error
Problem 1
- Root composer.json requires PHP ^7.2.0 but your PHP version (8.0.3) does not satisfy that requirement.
Problem 2
- laravel/framework[v5.8.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.0.3) does not satisfy that requirement.
- Root composer.json requires laravel/framework 5.8.* -> satisfiable by laravel/framework[v5.8.0, ..., 5.8.x-dev].
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是PHP中常见的问题,因为您的PHP版本与Laravel或您使用的软件包不匹配。现在,最好转到Composer.json文件,该文件说您可以使用这种方式的最后一个版本。
例如,在Laravel版本9中,最低PHP版本为8.0.2
This is a common problem in PHP because your PHP version does not match Laravel or the packages you use. Now it's better to go to the composer.json file that says the last version you can have this way.
For example, in Laravel version 9, the minimum PHP version is 8.0.2
在您的命令行类型中:
按ENTER,然后将要求包装键
按Enter,然后要求使用版本
Enter两次。希望这会有所帮助。
In your command line type:
press enter and then it will ask for the package
press enter and then it will ask for the version
press enter twice. Hope this helps.