Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

opam install error "no solution found"

Tags:

ocaml

opam

I came across a bug when installing certain packages using opam.

> opam install foo
Sorry, no solution found: there seems to be a problem with your request.

No solution found, exiting
like image 585
L. Soret Avatar asked Mar 06 '23 23:03

L. Soret


2 Answers

According to particular form of the error message I read you are using the opam v1.2 internal solver (which you can confirm via opam config report). This solver is no longer able to cope with the repository.

Either install an external solver, see here or switch to opam v2 (currently in rc) which bundles a decent solver.

like image 73
Daniel Bünzli Avatar answered Mar 19 '23 15:03

Daniel Bünzli


Opam was using a version of the ocaml compiler that wasn't able to install this package. So unistall the current version and use opam switch to set opam to use the latest ocaml compiler.

> opam switch x.xx.x

Then make sure to update/upgrade opam.

> opam update
> opam upgrade
like image 29
L. Soret Avatar answered Mar 19 '23 15:03

L. Soret