InvalidArgumentException] 在可使用 PHP 7.0.10 版安装的版本中找不到 5.6.* 版的 laravel/laravel 包

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48907546/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 17:25:52  来源:igfitidea点击:

InvalidArgumentException] Could not find package laravel/laravel with version 5.6.* in a version installable using your PHP version 7.0.10

phplaravel

提问by Shamim Sdr

i am using wampserver 3.0.6 64bit. My previoius php version was 7.0.10. I have installed the php7.1.14. See the screenshot php version

我正在使用 wampserver 3.0.6 64 位。我以前的 php 版本是 7.0.10。我已经安装了php7.1.14。看截图php版本

Now i am trying to install laravel 5.6 but i am getting error. This is the error -

现在我正在尝试安装 Laravel 5.6,但出现错误。这是错误 -

shami@DESKTOP-2JGHQPL MINGW64 /e/wamp64/www/laravel
$ composer create-project --prefer-dist laravel/laravel blog "5.6.*"
  [InvalidArgumentException]
  Could not find package laravel/laravel with version 5.6.* in a version installable using your PHP version 7.0.10.

error

错误

Please give me a solution what should i do now.

请给我一个解决方案,我现在该怎么办。

回答by Aron

To use laravel 5.6 you need php 7.1.3+

要使用 Laravel 5.6,您需要 php 7.1.3+

https://laravel.com/docs/5.6/#server-requirements

https://laravel.com/docs/5.6/#server-requirements

Server Requirements The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment.

服务器要求 Laravel 框架有一些系统要求。当然,所有这些要求 Laravel Homestead 虚拟机都能满足,所以强烈建议你使用 Homestead 作为你本地的 Laravel 开发环境。

However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

但是,如果您不使用 Homestead,则需要确保您的服务器满足以下要求:

PHP >= 7.1.3 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension XML PHP Extension Ctype PHP Extension JSON PHP Extension

PHP >= 7.1.3 OpenSSL PHP 扩展 PDO PHP 扩展 Mbstring PHP 扩展 Tokenizer PHP 扩展 XML PHP 扩展 Ctype PHP 扩展 JSON PHP 扩展