I have a freshly installed Laravel 7.10.* I want to install the Backpack composer require backpack/generators --dev but cannot install the generators. Here is the error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for laravel/framework (locked at v7.10.3, required ^7.0) -> satisfiable by laravel/framework[v7.10.3].
Installation request for backpack/generators ^3.0 -> satisfiable by backck/generators[3.0.0, v3.0.1, v3.x-dev].
Can only install one of: backpack/crud[4.1.x-dev, 4.0.61].
Can only install one of: backpack/crud[4.1.x-dev, 4.0.61].
Can only install one of: backpack/crud[4.1.x-dev, 4.0.61].
Conclusion: install backpack/crud 4.1.x-dev
Installation request for backpack/crud (locked at 4.0.61, required as 4.*) -> satisfiable by backpack/crud[4.0.61].`
Installation failed, reverting ./composer.json to its original content.
This is my composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"backpack/crud": "4.0.*",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"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
},
"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"
]
}
}
The problem is that you locked the backpack/crud version as 4.0.*, but for the backpack/generators the satisfiable versions are these: 4.1.0, 4.1.1, 4.1.x-dev
So you should change this line in your composer.json:
"backpack/crud": "4.0.*",
to this:
"backpack/crud": "4.1.*",
then update the composer packages:
composer update
and finally install the generator package:
composer require backpack/generators --dev
Related
I'm trying to install two packages. The passport and the auth. The Auth is because the passport requires this package, but when trying to install the passport, it says that it already finds a version but that it is not active/installed because of a conflict with another package.
I have no idea, I did some tests here, but I couldn't solve it. I really need help
I'll leave my composer.json below
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"aws/aws-sdk-php": "^3.208",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"kitetail/zttp": "^0.6.0",
"laracasts/flash": "^3.2",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5",
"laravel/ui": "2.4",
"maatwebsite/excel": "^3.1",
"timehunter/laravel-google-recaptcha-v2": "~1.0.0"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"lucascudo/laravel-pt-br-localization": "^1.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"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"
]
}
}
These are the errors/warnings you get when trying to install each package
composer require laravel/passport:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laravel/passport ^10.4 -> satisfiable by laravel/passport[v10.4.0, v10.4.1, 10.x-dev].
- laravel/passport[v10.4.0, ..., 10.x-dev] require illuminate/auth ^8.37|^9.0 -> found illuminate/auth[v8.37.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.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 laravel/passport:*" to figure out if any version is installable, or "composer require laravel/passport:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
composer require illuminate/auth ^8.37:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires illuminate/auth 8.37, found illuminate/auth[v8.37.0] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I tried to upload my laravel 8 app on remote server with ubuntu 18
and PHP 7.3.26-1+ubuntu18.04.1+deb.sury.org+1
but I got error running composer :
composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
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 unicodeveloper/laravel-emoji 1.0.* -> satisfiable by unicodeveloper/laravel-emoji[1.0.0].
- Conclusion: don't install laravel/framework v8.26.1 (conflict analysis result)
- unicodeveloper/laravel-emoji 1.0.0 requires illuminate/support 5.* -> satisfiable by illuminate/support[v5.0.0, ..., 5.8.x-dev].
- Only one of these can be installed: illuminate/support[dev-master, v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v8.26.1, 8.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^8.26.1 -> satisfiable by laravel/framework[v8.26.1, 8.x-dev].
On my local server (also ubuntu 18 ) I have PHP 7.4.13
In composer.json of my project :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"cviebrock/eloquent-sluggable": "^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"grimzy/laravel-mysql-spatial": "^5.0",
"guzzlehttp/guzzle": "^7.0.1",
"inacho/php-credit-card-validator": "^1.0",
"intervention/image": "^2.5",
"jenssegers/agent": "^2.6",
"laravel/fortify": "^1.7",
"laravel/framework": "^8.26.1",
"laravel/sanctum": "^2.8",
"laravel/tinker": "^2.5",
"laravelcollective/html": "^6.2",
"mews/purifier": "^3.3",
"mobiledetect/mobiledetectlib": "^2.8",
"pragmarx/countries-laravel": "^0.7.0",
"spatie/browsershot": "^3.41",
"spatie/geocoder": "^3.10",
"spatie/laravel-image-optimizer": "^1.6",
"spatie/laravel-permission": "^3.18",
"toin0u/geocoder-laravel": "^4.4",
"twilio/sdk": "^6.15",
"wboyz/laravel-enum": "^0.2.1",
"webpatser/laravel-uuid": "^3.0",
"unicodeveloper/laravel-emoji": "1.0.*",
"yajra/laravel-datatables-oracle": "^9.15"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^0.0.5",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": [
"app/library/helper.php"
],
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"post-update-cmd": [
"#php artisan cache:clear"
],
"post-install-cmd": [
"#php artisan cache:clear"
],
"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"
]
}
}
Is it issue of PHP 7.3/PHP 7.4 difference and how it can be fixed ?
Thanks!
Maybe you could use this package instead:
https://github.com/spatie/emoji
It requires php ^7.2|^8.0 so should work on both your environments.
There are a lot of versions of this question floating around, but i haven't found any that deal with these specific packages.
I am trying to install laravel passport version 10 into my laravel 8 installation,
When running composer require laravel/passport i get the following response:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport[v10.0.1, ..., 10.x-dev] require illuminate/auth ^8.2 -> found illuminate/auth[v8.2.0, ..., 8.x-dev] but it conflicts with another require.
- laravel/passport v10.0.0 requires illuminate/auth ^8.0 -> found illuminate/auth[v8.0.0, ..., 8.x-dev] but it conflicts with another require.
- Root composer.json requires laravel/passport ^10.0 -> satisfiable by laravel/passport[v10.0.0, v10.0.1, 10.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
found illuminate/auth ^8.0 -> found illuminate/auth[v8.0.0, ..., 8.x-dev] <- I dont understand this part, does it have anything to do with having "minimum-stability": "dev" in my composer.json?
Anyways, here is my composer.json:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4.1",
"fruitcake/laravel-cors": "^2.0.3",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^9.0",
"laravel/passport": "^10.0",
"laravel/tinker": "^2.5|dev-develop",
"paragonie/random_compat": "2.*"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"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"
]
}
}
EDIT 1:
I tried running composer require --no-update laravel/passport and when i run composer update I get the following error(i though it may provide extra info):
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport[v10.0.1, ..., 10.x-dev] require illuminate/support ^8.2 -> satisfiable by illuminate/support[v8.2.0, ..., 8.x-dev].
- laravel/passport v10.0.0 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., 8.x-dev].
- Only one of these can be installed: illuminate/support[dev-master, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[dev-master]. laravel/framework replaces illuminate/support and thus
cannot coexist with it.
- laravel/framework 9.x-dev is an alias of laravel/framework dev-master and thus requires it to be installed too.
- Root composer.json requires laravel/framework ^9.0 -> satisfiable by laravel/framework[9.x-dev (alias of dev-master)].
- Root composer.json requires laravel/passport ^10.0 -> satisfiable by laravel/passport[v10.0.0, v10.0.1, 10.x-dev].
EDIT 2:
To further explain the answer below, you have to delete the vendor folder and composer.json file inside your project, the you run composer install to downgrade to laravel 8.
After that you can run composer require laravel/passport and it will install properly
Just simple do one thing
remove composer.lock file and then install your required package
It work for me...
Downgrade your Laravel version from 9 to 8
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4.1",
"fruitcake/laravel-cors": "^2.0.3",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.0",
"laravel/passport": "^10.0",
"laravel/tinker": "^2.5|dev-develop",
"paragonie/random_compat": "2.*"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"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"
]
}
}
I was able to solve this problem just by modifying the PHP PATH on my operating system, at the time I am using windows with WampServer.
The change suggested above may work, but if a composer install command is being run, it is because an App already exists and is just downloading its dependencies, so changing the file suggested above can cause problems in the operation of the Application.
I think that changing the PATH note to the correct PHP version will work, in my case:
C:\wamp64\bin\php\php7.3.21 worked.
Valew.
I vas trying to install barryvdh/laravel-ide-helper when I got this error. It required PHP 7.3+ and Laravel 8.0+ as described here, but I had lower versions. So here are the steps I followed:
Deleted composer.lock file
Changed the version of PHP and Laravel in composer.json
Ran composer install which creates a new composer.lock file
Then ran composer require barryvdh/laravel-ide-helper and it was installed successfully
Just delete composer.json and composer.lock files, and it will do the trick :)
Unable to install package from laravel 5.7
Using version ^0.8.4 for barryvdh/laravel-dompdf ./composer.json has been updated
Loading composer repositories with package information Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/passport == 7.2.1.0
-> satisfiable > by laravel/passport[v7.2.1].
- avored/ecommerce 2.0 requires laravel/passport 5.0.*
-> satisfiable by laravel/passport[5.0.x-dev].
- avored/ecommerce 2.0.1 requires laravel/passport 5.0.*
-> satisfiable by laravel/passport[5.0.x-dev].
- Conclusion: don't install laravel/passport 5.0.x-dev
- Installation request for avored/ecommerce 2.*
-> satisfiable by > avored/ecommerce[2.0, 2.0.1].
Installation failed, reverting ./composer.json to its original content.
My composer.json file:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"avored/ecommerce": "2.*",
"avored/module-installer": "1.*",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/passport": "^7.2",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.7",
"unisharp/laravel-filemanager": "^1.8"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0",
"laravel/dusk": "^4.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Delete to this in your composer.json file:
"require": {
"avored/ecommerce": "2.*",
}
Then update composer: composer update
This package(avored/ecommerce) is not compatible with Laravel 5.7
For testing purpose I have try this command(composer require avored/ecommerce) in Laravel 5.5, 5.6 and 5.7
It's worked only Laravel5.5, other 5.6 and 5.7 I also got the same error as yours.
There is a dependency conflict specified on the composer.json file, you are stating that you want "laravel/passport": "^7.2" or later, but as you can seee on the avored composer file it requieres laravel/passport 5.0 so downgrade your dependency requirement.
Also I'm pretty sure passport 5.x is compatible with Laravel 5.6 so you need to downgrade laravel to ^5.6 as well.
Change:
"laravel/framework": "5.7.*",
"laravel/passport": "^7.2",
with:
"laravel/framework": "5.6.*",
"laravel/passport": "^5.0",
And then execute composer update
I'm trying to install mpdf using composer command :
composer require mpdf/mpdf
but I am getting this error:
Problem 1
- Conclusion: don't install mpdf/mpdf v7.1.5
- Conclusion: don't install mpdf/mpdf v7.1.4
- Conclusion: don't install mpdf/mpdf v7.1.3
- Conclusion: don't install mpdf/mpdf v7.1.2
- Conclusion: don't install mpdf/mpdf v7.1.1
- Conclusion: remove setasign/fpdi v2.1.0
- Installation request for mpdf/mpdf ^7.1 -> satisfiable by mpdf/mpdf[v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.1.4, v7.1.5].
- Conclusion: don't install setasign/fpdi v2.1.0
- mpdf/mpdf v7.1.0 requires setasign/fpdi 1.6.* -> satisfiable by setasign/fpdi[1.6.0, 1.6.1, 1.6.2].
- Can only install one of: setasign/fpdi[1.6.0, v2.1.0].
- Can only install one of: setasign/fpdi[1.6.1, v2.1.0].
- Can only install one of: setasign/fpdi[1.6.2, v2.1.0].
- Installation request for setasign/fpdi (locked at v2.1.0) -> satisfiable by setasign/fpdi[v2.1.0].
Installation failed, reverting ./composer.json to its original content.
this is my composer.json
{
"lynx39/lara-pdf-merger": "1.0.*",
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"codedge/laravel-fpdf": "^1.2",
"crabbly/fpdf-laravel": "^1.0",
"cyber-duck/laravel-excel": "^1.2",
"dompdf/dompdf": "^0.8.2",
"fideloper/proxy": "^4.0",
"jurosh/pdf-merge": "^2.0",
"laravel/framework": "5.6.*",
"laravel/passport": "^7.0",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.0",
"mpdf/mpdf": "^7.1",
"paragonie/random_compat": "2.*",
"phpoffice/phpspreadsheet": "^1.4",
"phpoffice/phpword": "^0.15.0",
"rguedes/pdfmerger": "^1.0",
"setasign/fpdi-fpdf": "^2.0",
"tecnickcom/tc-lib-pdf": "dev-master"
},
"require-dev": {
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "extra": { "laravel": { "dont-discover": [ ] } }, "scripts": { "post-root-package-install": [ "#php-r\"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Any solution??
mPDF 7.x is not compatible with setasign/fpdi in version 2.x - use version 1.6.
For setasign/fpdi 2.x upgrade to mPDF 8.x.