关于 laravel new blog 安装报错问题
本文介绍了关于 laravel new blog 安装报错问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
使用 laravel 命令下载个新的 laravel 包提示:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement.
Problem 2
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement.
- laravel/framework v5.4.30 requires doctrine/inflector ~1.0 -> satisfiable by doctrine/inflector[v1.2.0].
- Installation request for laravel/framework v5.4.30 -> satisfiable by laravel/framework[v5.4.30].
Application ready! Build something amazing.
说我 PHP 版本太低了。
但是我用 composer create-project laravel/laravel --prefer-dist blog
安装就没有问题。这两者有什么问题吗?还有如果要解决 laravel 命令报错,是不是只要更换 PHP
版本就可以了?
解决方案
首先说下问题:
1.很明显,报错原因是因为laravel5.4.30的组件doctrine/inflector1.2.0的需求PHP的版本为:^php7.0。
2.composer create-project laravel/laravel --prefer-dist blog 下载的版本应该不是laravel5.4.30或者检查下composer.json中看下doctrine/inflector版本是否一致吧?
解决方案:换php7即可
这篇关于关于 laravel new blog 安装报错问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文