dev,
请有人遇到这种问题吗,我正在安装新的laravel 8,并希望与之一起安装[jet stream和livewire][1],我安装了带有以下cmd:的laraver 8
composer create-project --prefer-dist laravel/laravel blog
然后继续安装带有的喷流
$ composer require laravel/jetstream
此cmd结果:
;http://repo.packagist.org/p/provider-2019%2427b76b9f0218e7440cf8a7d3dfe11f6ac69610e72f5277d4ee2bf31e24c43772.json"无法下载文件:php_network_getaddresses:getaddrinfo失败:不知道这样的主机。无法打开流:php_network_getaddresses:getaddrinfo失败:不知道这样的主机。http://repo.packagist.org无法完全加载,包信息是从本地缓存加载的,可能是过期的
[InvalidArgumentException]版本的包laravel/jetstream具有与wi不兼容的PHP要求您的PHP版本(7.2.32(
require[-dev][-preferred source][-prefer dist][-fixed][-无进度][-不建议][-未更新][-没有脚本][-更新无dev][-使用依赖项][-用所有依赖项更新][-ignore platform reqs][-preferre stable][-preferent lower][-排序包][-o|--optimize autoloader][-a|--classmap authorized][-apcu autoloader][-][]。。。
我运行
php -v
这是我的php版本:
PHP 7.2.32(cli((构建时间:2020年7月8日10:38:05((ZTS MSVC15(Visual C++2017(x64(版权所有(c(1997-2018 PHP集团Zend Engine v3.2.0,版权所有(c(1998-2018 Zend Technologies
我试着通过cm为一个作曲家更新我的PHP版本:
$ composer config platform.php 7.4.3
并尝试运行
$ composer require laravel/jetstream
结果是:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v7.28.3
- Conclusion: don't install laravel/framework v7.28.3
- laravel/jetstream 1.x-dev requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
- laravel/jetstream v1.3.0 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
- laravel/jetstream v1.3.1 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
- laravel/jetstream v1.3.2 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.2.0, v8.3.0, v8.4.0, v8.5.0, v8.6.0, v8.7.0, v8.7.1, v8.8.0].
- don't install illuminate/support 8.x-dev|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.0.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.0.1|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.0.2|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.0.3|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.0.4|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.1.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.2.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.3.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.4.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.5.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.6.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.7.0|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.7.1|don't install laravel/framework v7.28.3
- don't install illuminate/support v8.8.0|don't install laravel/framework v7.28.3
- Installation request for laravel/framework (locked at v7.28.3, required as ^7.24) -> satisfiable by laravel/framework[v7.28.3].
- Installation request for laravel/jetstream ^1.3 -> satisfiable by laravel/jetstream[1.x-dev, v1.3.0, v1.3.1, v1.3.2].
Installation failed, reverting ./composer.json to its original content.
这是我的composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.24",
"laravel/tinker": "^2.0"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"platform": {
"php": "7.4.3"
}
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"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版本,但我不知道在哪里
请引导,谢谢[1] :https://jetstream.laravel.com/
在我看来,信息缺乏。但是就我而言。!
composer global remove laravel / installer
composer global remove laravel / laravel **
和
composer global require laravel / installer
php -v
PHP 7.4.19(cli((构建时间:2021年5月4日11:06:37((NTS(版权所有(c(PHP Group Zend Engine v3.4.0,版权所有(c(Zend Technologies与Zend OPcache v7.4.19,版权所有(c(,由Zend Technologies 提供
在那里您可以使用`
composer global config platform.php 7.4.19
使用php版本全局配置composer
现在。我使用喷射流
laravel new minimarket --git -f --jet
对于这种方法,安装clean you laravel 8,我使用Fedora 34和maria数据库
请检查Laravel 8是否需要PHP 7.3或更高版本(因为您使用的是php7.2,所以出现问题(
请检查文档https://laravel.com/docs/8.x