Composer: Your requirements could not be resolved to an installable set of packages — how to fix it
Your requirements could not be resolved to an installable set of packages means Composer found no set of versions that fits composer.json and the machine it runs on. The Problem lines under it name the cause: Root composer.json requires php ^8.3 but your php version (8.2.x) does not satisfy that requirement is a PHP version mismatch, it is missing from your system is a missing extension, and the rest are conflicting constraints. Match PHP versions, set config.platform.php, install the extension, or find the blocker with composer why-not.
By Livops team, the people who build and run LivopsUpdated
The error, from composer update, composer require, or composer install without a lock file (names and versions vary)[1][2]:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires php ^8.3 but your php version (8.2.29) does not satisfy that requirement.
Problem 2
- Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension.
When the requirement comes from a dependency rather than your own composer.json, the line names the package and puts the reason after an arrow[2][3]:
- acme/pdf-tools 2.1.0 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
And when composer install cannot use the lock file on this machine, the headline is a different one, with the same kind of Problem lines under it[1]:
Your lock file does not contain a compatible set of packages. Please run composer update.
This page explains what Composer checks, how to read the Problem lines, the four causes from the most common, and how to check a project before you deploy it.
What does the error mean?
Composer treats PHP itself, its extensions and some system libraries as platform packages: php, ext-* such as ext-mbstring, and lib-*. No code is installed for them; their versions come from the environment Composer runs in, and Composer cannot update or remove them[5]. A "php": ">=7.4" requirement is checked against the PHP that runs the composer command[5]. composer show --platform lists what your environment provides[5].
When no combination of package versions fits all requirements, Composer stops with Your requirements could not be resolved to an installable set of packages.[1] and numbers the reasons as Problem 1, Problem 2 and so on[4]. install with a composer.lock uses the exact versions in the lock instead of resolving them[6]; when those do not fit this machine, the headline is Your lock file does not contain a compatible set of packages[1].
| The Problem line says | Look at |
|---|---|
Root composer.json requires php … but your php version (…) does not satisfy that requirement |
Your PHP version (cause 1) |
<package> requires php … -> your php version (…) does not satisfy that requirement |
A lock or a package for a newer PHP (cause 2) |
… it is missing from your system. Install or enable PHP's … extension. |
A missing extension (cause 3) |
found … but it conflicts with …, or … but these were not loaded |
Conflicting constraints (cause 4) |
After an extension problem Composer adds a hint: the .ini files PHP loaded, php --ini to see which files the command-line PHP uses, and the --ignore-platform-req=ext-… option[4]. After a problem caused by the lock, it suggests --with-all-dependencies (-W)[4].
Causes, most common first
1. The PHP that runs Composer is older than your composer.json asks for
Your laptop has PHP 8.4, the server or CI has 8.2, and composer.json says "php": "^8.3". A new Laravel 13 app is exactly that: Laravel 13 requires PHP 8.3 or higher[10], and the skeleton’s composer.json requires "php": "^8.3"[11].
Fix: run the PHP version the project asks for, where Composer runs and where the app runs. Check both sides:
php -v
composer show --platform
If the project really must run on the older PHP, lower require.php and update the packages that need the newer one (cause 4 shows how to find them).
2. composer.lock was resolved for a newer PHP
composer update on a laptop with PHP 8.4 can lock releases that require 8.4. The server’s composer install then fails with the lock file headline, or with <package> requires php >=8.4 -> your php version (8.2.29) does not satisfy that requirement[3].
Fix: tell Composer which PHP you deploy on. config.platform fakes platform packages so you can emulate production: no package requiring more than that PHP can be installed, whatever PHP you run locally[7]. Set it to the server’s exact version, then update the lock:
{
"config": {
"platform": {
"php": "8.2.29"
}
}
}
composer update
Use the full version: with {"php": "7.4"}, no package that needs 7.4.1 as a minimum is used[7]. The flip side is that dependencies are no longer checked against your real PHP: on a PHP older than the one you declared, packages install fine and then fail at run time[7]. That is why Composer recommends running check-platform-reqs as part of the deployment[7] (see below). At run time, the autoloader’s platform check stops an app on the wrong PHP with a line such as Your Composer dependencies require a PHP version ">= 8.3.0". You are running 8.2.29.[8]; by default it checks the PHP version only, and "platform-check": true makes it check extensions too[7].
3. A PHP extension is missing
ext-intl, ext-gd, ext-bcmath and the like are required by your composer.json or by a package, and the PHP running Composer does not have them loaded. Laravel itself needs a list of extensions, among them Ctype, cURL, DOM, Fileinfo, Mbstring, OpenSSL, PDO, Tokenizer and XML[10].
Fix: install or enable the extension for the same PHP version that runs Composer and the app. php -m prints the loaded modules, and php --ini the configuration files the command-line PHP reads[9]:
php -m | grep -i intl
php --ini
--ignore-platform-req=ext-foo gets past it temporarily, but Composer’s docs say to install required extensions in the long run: ignore one now, and a package added a month later that needs it can break production unnoticed[7]. The opposite case, an extension you have locally but production does not, is handled with {"ext-foo": false} in config.platform, which hides it from Composer[7].
4. Two requirements conflict
Two packages, or a package and your own composer.json, ask for versions that cannot both be installed. The Problem lines then say found … but it conflicts with your root composer.json require or these were not loaded, likely because it conflicts with another require[2].
Fix: ask Composer what blocks it. composer why-not (also prohibits) lists the packages that stop a given package and version from being installed, and works for platform packages too, for example to check whether the server can move to another PHP[6]:
composer why-not laravel/framework 13.0
composer why-not php 8.2
-r follows the chain up to your composer.json, and -t prints it as a tree[6]. Then loosen the constraint the output names, or let Composer move the locked dependencies too[6]:
composer update laravel/framework --with-all-dependencies
When a package’s upper bound on PHP is the only obstacle, --ignore-platform-req=php+ ignores just that bound: a package that requires php: ^7 can then install on PHP 8, but still not on 5.6[6]. Use it knowing the package’s authors have not said it works there.
How to check before you deploy
Run these with the PHP version you deploy on. check-platform-reqs checks that your PHP and extensions match the requirements of the installed packages, and unlike install and update it ignores config.platform and checks the real ones; --lock reads the lock file and --no-dev skips dev requirements[6]. validate checks that composer.json is valid and that the lock is up to date with it[6].
composer validate
composer check-platform-reqs --lock --no-dev
On Livops
- PHP is detected. Livops recognises Laravel and plain PHP projects and fills in their install, build and start commands; see Frameworks and livops.json. Which PHP versions it runs, and how the version is taken from
composer.json, is on Laravel hosting. - Make the lock fit that PHP. Set
config.platform.phpto the version the project runs on, runcomposer update, and commitcomposer.lock. Then the deploy installs what you tested. - When the install fails, the build log has Composer’s Problem lines, and the assistant’s button next to the failed build reads the log and explains it. See Install failed and AI assistant.
- The install command is yours to change, in Settings → Install or with
installinlivops.json. Do not make--ignore-platform-reqspermanent there: the error only moves to run time. - An extension that is not there. If the repository has a
Dockerfile, it is used, and in it you install what the project needs.
A PHP web app costs 39 credits a month; a queue worker or a cron job 19. When the install passes but PHP runs out of memory later: Allowed memory size of 134217728 bytes exhausted. The rest of a PHP deploy: PHP hosting.
Questions
What does Root composer.json requires php but your php version does not satisfy that requirement mean?
Your own composer.json asks for a PHP version, for example ^8.3, and the PHP that runs Composer is older, for example 8.2. Composer checks the requirement against the PHP running the command, so either run a newer PHP or change the requirement and the packages that need it.
Why does it install on my laptop but fail on the server?
The two run different PHP versions or have different extensions. composer.lock was resolved with the laptop's PHP, so it can hold releases that need a newer PHP than the server has. Compare php -v and php -m on both, or set config.platform.php to the server's version and update the lock.
Should I use --ignore-platform-reqs?
Only as a temporary step. It forces the installation even though the machine does not meet the requirements, so the failure moves to run time, where Composer's platform check or the code itself stops. Install the extension or match the PHP version instead.
What does config.platform.php do?
It tells Composer to resolve dependencies as if PHP were that version, whatever PHP you run. It does not change your PHP. Set it to the exact version your server runs, and run composer check-platform-reqs where the app runs, because that command checks the real PHP and extensions.
How do I find which package blocks an upgrade or a PHP version?
Run composer why-not with the package and the version, for example composer why-not php 8.2 or composer why-not laravel/framework 13.0. It lists the packages that block it. Add -r to follow the chain up to your composer.json.
Which php.ini does Composer use?
The one the command-line PHP loads, which can differ from the web server's. php --ini prints it and any extra .ini files, and Composer's own hint after an extension problem lists the same files.
How do I fix it on Livops?
Make composer.json and composer.lock fit the PHP version the project runs on, push, and deploy again. The build log shows Composer's Problem lines, and the assistant's button next to a failed build explains them.
Sources
- Composer source — src/Composer/Installer.php (github.com). Checked .
- Composer source — src/Composer/DependencyResolver/Problem.php (github.com). Checked .
- Composer source — src/Composer/DependencyResolver/Rule.php (github.com). Checked .
- Composer source — src/Composer/DependencyResolver/SolverProblemsException.php (github.com). Checked .
- Composer docs — Composer platform dependencies (getcomposer.org). Checked .
- Composer docs — Command-line interface (getcomposer.org). Checked .
- Composer docs — Config (platform, platform-check) (getcomposer.org). Checked .
- Composer source — src/Composer/Autoload/AutoloadGenerator.php (github.com). Checked .
- PHP manual — Command line options (php.net). Checked .
- Laravel docs — Deployment, server requirements (13.x, docs source) (github.com). Checked .
- Laravel application skeleton — composer.json (13.x) (github.com). Checked .
Put your project online today
Connect GitHub or drop a folder. No card is asked for.
Deploy your PHP appRelated
- PHP Fatal error: Allowed memory size of 134217728 bytes exhausted — how to fix itPHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate N bytes) means one PHP process reached its memory_limit, here 128M, PHP's default. Raise the limit for one run with php -d memory_limit=512M, in php.ini, or for Composer with COMPOSER_MEMORY_LIMIT; then fix what filled it, usually a query that loads every row at once or a response built in memory. In Laravel, chunk, lazy and streamed responses keep memory flat.
- PHP hosting in 2026: how to deploy a PHP app or siteA PHP project is recognised from index.php or composer.json, its dependencies are installed, and it is served by FrankenPHP on the port Livops assigns. A plain folder of PHP files needs no configuration at all.
- Laravel hosting with queues and the scheduler: the options comparedA Laravel app in production is three processes: the web server, a queue worker that is restarted on every deploy, and the scheduler run every minute. On Livops the web app runs from a push with APP_KEY generated and migrations run, for 39 credits a month (39,000 so'm), and the worker and the scheduler are services of their own at 19 credits each. Here is how Render, Railway, Fly.io and a VPS compare.
- Laravel: No application encryption key has been specifiedLaravel's encrypter has no key, because the APP_KEY environment variable is empty on the server. Generate one with php artisan key:generate --show, set it as APP_KEY where the app runs, clear any cached configuration, and keep the same key from then on.
- pip: Could not find a version that satisfies the requirement / No matching distribution found — how to fix itERROR: Could not find a version that satisfies the requirement X (from versions: none), followed by No matching distribution found for X, means pip searched the package index and found no release of X it can install here. The name is wrong (often the import name instead of the package name), the pinned version does not exist, every release needs a different Python, no file fits your platform, or pip is looking at the wrong index or cannot reach it. The versions list in the message tells you which.
- npm ci can only install packages when your package.json and package-lock.json are in sync: how to fix itnpm ci can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync (npm error code EUSAGE) means the committed lockfile no longer matches package.json: a dependency was added or changed without re-running npm install, or the lockfile was not committed. Run npm install locally, commit package.json and package-lock.json together, and npm ci passes.