在 Laravel 8 中安装 Jetstream

Installation of Jetstream in Laravel 8

提问人:hasssanullahusmani 提问时间:11/12/2023 最后编辑:Vlad DXhasssanullahusmani 更新时间:11/12/2023 访问量:15

问:

当我在 Laravel 8 中安装 Jetstream 时,在终端中运行以下命令:

作曲家需要 Laravel/Jetstream

出现以下错误:

PS C:\Users\dell\Desktop\project> composer require laravel/jetstream
./composer.json has been updated
Running composer update laravel/jetstream
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php ^7.3 but your php version (8.2.4) does not satisfy that requirement.
  Problem 2
    - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested.
    - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.2.4) does not satisfy that requirement.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/jetstream:*" to figure
out if any version is installable, or "composer require laravel/jetstream:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
拉拉维尔-8

评论

0赞 panthro 11/12/2023
您的 PHP 版本不正确,它需要版本 7
0赞 hasssanullahusmani 11/12/2023
我已经安装了xampp的最新版本,php版本是8.2.x

答:

0赞 Ali Salehi 11/30/2023 #1

在项目路径中打开 cmd 并运行 .php -v

如果没有看到 PHP 版本 8.2.4,您应该将 PHP 路径添加到 Windows env。

有关详细信息,请参阅此链接 => 将 XAMPP PHP 添加到 Windows 10 中的环境变量