4

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
L. Soret
  • 169
  • 10
  • Just as a side-note, make sure you have an external dependency solver installed (such as `aspcud`). OPAM's internal solver is known to be a little unstable. – Richard-Degenne Jun 20 '18 at 09:14

2 Answers2

5

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.

Daniel Bünzli
  • 5,119
  • 20
  • 21
  • FWIW, I just got this from opam 2.0.3 when trying to install httpaf-async or httpaf-lwt-unix. – J D May 12 '21 at 00:06
3

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
L. Soret
  • 169
  • 10
  • You might want to do `opam update` before creating the switch. – PatJ Jun 20 '18 at 11:08
  • Hmm... in 2021-12, looks like maybe this should be `opam switch create x.xx.x` ? I would edit the answer, but I don't have enough experience using opam to be confident here. – John Clements Dec 27 '21 at 23:43