Package conflict between core and base-domains with ocaml5

Hi, I’m a complete OCaml beginner here, learning OCaml for a project. Now I am using ocaml 5.0.0+trunk.
Recently I have a problem getting OPAM to install the “core” library. When I executed opam install core, there would always be a error as follows:

[ERROR] Package conflict!

  • Incompatible packages:
    • core
    • (invariant) → ocaml-variants = 5.0.0+trunk → base-domains
      You can temporarily relax the switch invariant with `–update-invariant’

No solution found, exiting

The opam install core --update-invariant will downgrade the ocaml from 5.0.0 to 4.12.0.
I had used opam repo add janestreet-bleeding to use another repository but still got the same result.
I wonder if someone could give me some suggestions? Thanks in advance!

Do you have a specific reason to use a development version of OCaml?

As a beginner, I would advise you to use either the last released version (4.14.0), or if you really want to use domains, the version 5.0.0~alpha0 combined with the opam alpha repository.

1 Like

Thanks for you reply!
Your recommendation is helpful. I really appreciate your time.

Yes, becasue that project involves multicore and parallel programs. It used 4.12.0+domain before so I thought it would also work for OCaml 5.
Now I use 5.0.0~alpha0, adding opam repo add alpha git+ As a result, there is no error when I installed “core”. Thanks again!