[英]Problems installing tymon jwt auth in Laravel 9
Please I'm having issue installing in Laravel 9. I don't know may be tymon jwt auth is not yet compactible with Laravel 9. This is the error I'm getting below.请我在 Laravel 9 中安装时遇到问题。我不知道可能是 tymon jwt auth 尚未与 Laravel 9 兼容。这是我在下面遇到的错误。
When I ran composer require tymon/jwt-auth
:当我运行composer require tymon/jwt-auth
时:
Problem 1
- Root composer.json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
- tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require tymon/jwt-auth:*" to figure out if any version is installable, or "composer require tymon/jwt-auth:^2.1" if you know which you need.
When I ran composer require tymon/jwt-auth "^1.0"
:当我运行composer require tymon/jwt-auth "^1.0"
时:
Problem 1
- tymon/jwt-auth dev-develop requires illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth 1.0.0-alpha1 requires illuminate/auth 5.1.* || 5.2.* -> found illuminate/auth[v5.1.1, ..., 5.2.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth[1.0.0-alpha.2, ..., 1.0.0-rc.4.1] require php ^5.5.9 || ^7.0 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth[1.0.0-rc.5, ..., 1.0.2] require php ^5.5.9|^7.0 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth 1.0.x-dev is an alias of tymon/jwt-auth dev-develop and thus requires it to be installed too.
- Root composer.json requires tymon/jwt-auth ^1.0 -> satisfiable by tymon/jwt-auth[1.0.0-alpha1, ..., 1.0.x-dev (alias of dev-develop)].
When I ran composer require tymon/jwt-auth:"dev-develop"
:当我运行composer require tymon/jwt-auth:"dev-develop"
时:
Problem 1
- Root composer.json requires tymon/jwt-auth dev-develop -> satisfiable by tymon/jwt-auth[dev-develop].
- tymon/jwt-auth dev-develop requires illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
When I ran composer require tymon/jwt-auth: *当我运行 composer require tymon/jwt-auth: *
- tymon/jwt-auth[dev-dependabot/composer/yoast/phpunit-polyfills-tw-1.0.0, dev-dependabot/add-v2-config-file, dev-develop, 1.0.x-dev] require illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth 2.0.x-dev requires php ^7.4 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth[0.1.0, ..., 0.3.6] require illuminate/support 4.2.* -> found illuminate/support[v4.2.0-BETA1, ..., 4.2.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth[0.3.7, ..., 0.4.3] require illuminate/support ~4.0 -> found illuminate/support[v4.0.0-BETA2, ..., 4.2.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth[dev-master, 0.5.0, ..., 0.5.12] require illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth 1.0.0-alpha1 requires illuminate/auth 5.1.* || 5.2.* -> found illuminate/auth[v5.1.1, ..., 5.2.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth[1.0.0-alpha.2, ..., 1.0.0-rc.4.1] require php ^5.5.9 || ^7.0 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth[1.0.0-rc.5, ..., 1.0.2] require php ^5.5.9|^7.0 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth 1.0.x-dev is an alias of tymon/jwt-auth dev-develop and thus requires it to be installed too.
- Root composer.json requires tymon/jwt-auth * -> satisfiable by tymon/jwt-auth[dev-dependabot/composer/yoast/phpunit-polyfills-tw-1.0.0, dev-dependabot/add-v2-config-file, dev-master, dev-develop, 0.1.0, ..., 0.5.12, 1.0.0-alpha1, ..., 1.0.x-dev (alias of dev-develop), 2.0.x-dev].```
An update of composer.json
is missing缺少composer.json
的更新
I used this:我用这个:
composer require tomfordrumm/jwt-auth:dev-develop
tymon/jwt-auth is no more compatible with Laravel 9 , I faced same issue and I fixed it by : tymon/jwt-auth不再与Laravel 9兼容,我遇到了同样的问题,我通过以下方式修复了它:
Deleting composer.lock file and remove tymon/jwt-auth from "composer.json" packages object,删除 composer.lock 文件并从“composer.json”包对象中删除 tymon/jwt-auth ,
then do following steps:然后执行以下步骤:
composer install作曲家安装
After composer install Run "composer require php-open-source-saver/jwt-auth"作曲家安装后运行“作曲家需要php-open-source-saver/jwt-auth”
Run: php artisan vendor:publish --provider="PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider"运行: php artisan vendor:publish --provider="PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider"
NOTE: Do rest of JWT auth configurations注意:做其余的 JWT 身份验证配置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.