How can I resolve "Your requirements could not be resolved to an installable set of packages" error?
Run this command:
composer install --ignore-platform-reqs
or
composer update --ignore-platform-reqs
Your software dependencies have an incompatible version conflict.
At the same time you want to install any Laravel 4.2.x version, and "zizaco/entrust" from its master branch. And that master branch requires at least Laravel 5.0 (roughly speaking).
The problem comes from the dependency on branches. It's likely that the package zizaco/entrust once was using Laravel 4.2 in its master branch, and that you were able to install your dependencies at that day. But the very moment this branch gets updated with an incompatible version requirement, you will never ever be able to run composer update
and get updated dependencies.
Always use tagged versions! Ideally you use a relaxed version requirement that allows for compatible updates. This should be expressed as a tilde-two-number version requirement: ~1.2
would install a version 1.2.0 and up (like 1.2.99 or 1.2.100), and also 1.3 and up. If you need a certain patch release: Caret-three-number version ^1.2.10
will install 1.2.10 or up, also 1.3 and up.
Using this version requirement instead of dev-master
will allow you to use released versions instead of the unstable state in the master branch, and allows you to address the most recent version that still works with Laravel 4.2. I guess that would be zizaco/entrust version 1.3.0, but version 1.2 would also qualify. Go with "zizaco/entrust": "~1.2"
.
I am facing the same issue. I am using 'Lumen' microservice framework. I recently resolved the same issue by installing two packages:-
- sudo apt-get install php7.0-mbstring,
- sudo apt-get install php7.0-xml or sudo apt-get install php-xml
After installing this, you need to execute this command:- composer update
Hope, it will resolve the issue. I work on my system.