opam "No solution found" dependency conflict in CI
opam ran its dependency solver and could not find a set of package versions that satisfies all of your constraints at once. It prints the conflicting requirements and refuses to install.
What this error means
opam install fails with "[ERROR] No solution found, exiting" or "Sorry, no solution found", followed by a list of the constraints that conflict.
[ERROR] Could not determine a set of packages to install:
- dune >= 3.0 is not available because the package is pinned to 2.9.3
- your request is rejected
No solution found, exitingCommon causes
Conflicting version constraints
Two dependencies, or a pin and a manifest bound, demand incompatible versions of a shared package, so no install set exists.
A pin or stale repository blocks an upgrade
A leftover pin or an out-of-date opam repository prevents the solver from seeing a version that would satisfy the request.
How to fix it
Update the repository and relax constraints
- Run
opam updateso the solver sees current package versions. - Remove any stray pins that block the needed version.
- Re-run the install from the project manifest.
opam update
opam install . --deps-onlyInspect the conflict directly
Ask opam to explain which constraints clash so you can loosen the over-tight bound in your opam file.
opam install . --deps-only --solver=builtin-mccs --verboseHow to prevent it
- Run
opam updatebefore installing in CI so the solver is current. - Avoid leftover pins; remove them once they are no longer needed.
- Keep version bounds in the opam file as loose as the project allows.