[英]Problem with installing a Laravel package using composer
I want to using a package in my project.我想在我的项目中使用 package。
Composer.json:作曲家.json:
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"hekmatinasser/verta": "^1.11",
"laravel/framework": "^7.29",
"laravel/passport": "^9.3",
"laravel/tinker": "^2.5",
"lcobucci/jwt": "3.3.3",
"pishran/zarinpal": "^2.2"
},
My target package to install:我的目标 package 安装:
composer require ipecompany/smsirlaravel
Problem: When I try this on composer, I see follwing error问题:当我在 composer 上尝试这个时,我看到以下错误
Problem 1
- ipecompany/smsirlaravel[v1.0.0, ..., v1.0.7] require guzzlehttp/guzzle ~6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but the package is fixed to 7.2
.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires ipecompany/smsirlaravel ^1.0 -> satisfiable by ipecompany/smsirlaravel[v1.0.0, ..., v1.0.7].
I tried:我试过了:
composer require ipecompany/smsirlaravel -W
But the main problem is Laravel Passport
maybe because of following error:但主要问题是
Laravel Passport
可能是因为以下错误:
Problem 1
- laravel/passport is locked to version v9.3.2 and an update of this package was not requested.
- laravel/passport v9.3.2 requires laminas/laminas-diactoros ^2.2 -> found laminas/laminas-diactoros[2.2.0, ..., 2.6.x-dev] but it conflicts with another require.
I tried to install laminas/laminas-diactoros ^2.2
but I got another error我尝试安装
laminas/laminas-diactoros ^2.2
但又遇到了另一个错误
problem 1
- Root composer.json requires laminas/laminas-diactoros 2.2, found laminas/laminas-diactoros[2.2.0] but it conflicts with another require.
Problem 2
- laravel/passport is locked to version v9.3.2 and an update of this package was not requested.
- laravel/passport v9.3.2 requires laminas/laminas-diactoros ^2.2 -> found laminas/laminas-diactoros[2.2.0, ..., 2.6.x-dev] but it conflicts with another require.
Any body can help me to install this package?任何人都可以帮我安装这个 package? TNX
TNX
As written in the first error message: ipecompany/smsirlaravel
requires v6 of Guzzle, but currently v7 is installed.如第一条错误消息中所述:
ipecompany/smsirlaravel
需要 Guzzle v6,但当前已安装 v7。 You should use a different version constraint for Guzzle first: change "guzzlehttp/guzzle": "^6.3.1|^7.0.1"
to "guzzlehttp/guzzle": "^6.3.1"
.您应该首先对 Guzzle 使用不同的版本约束:将
"guzzlehttp/guzzle": "^6.3.1|^7.0.1"
更改为"guzzlehttp/guzzle": "^6.3.1"
。 Afterwards, run composer update guzzlehttp/guzzle
such that Guzzle v6 is installed.之后,运行
composer update guzzlehttp/guzzle
guzzle 以安装 Guzzle v6。
Afterwards, running composer require ipecompany/smsirlaravel
should work之后,运行
composer require ipecompany/smsirlaravel
应该可以工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.