Ocaml version issue with codept

I tried installing the codept package but I got the following error message :

$ opam install codept
The following dependencies couldn’t be met:

  • codept → ocaml < 4.10
    base of this switch (use `–unlock-base’ to force)

No solution found, exiting

Does it mean I have to create an adhoc switch from scratch with an older version of OCaml?

If you are using the OCaml 5.0.0 beta, you can pin the dev version with

opam pin --dev-repo codept

(I will push the fix for supporting OCaml 5 today.)

I’m not, as a matter of fact I’m using OCaml 4.11

Then this looks like a not-up-to-date opam repository. Does the error still happen after an opam update?

Ah, now opam update produces an error also, perhaps I should put that in a separate question :

$ opam update

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><> :camel:
[ERROR] Could not update repository “default”: OpamDownload.Download_fail(_, “Download command failed: "/usr/local/bin/wget --content-disposition -t 3 -O
/private/var/folders/tt/yb3gx3752290_8d25ylsvwtm0000gn/T/opam-10594-5a61c5/index.tar.gz.part https://opam.ocaml.org/index.tar.gz -U opam/2.0.0" exited with
code 5 "ERROR: cannot verify opam.ocaml.org’s certificate, issued by \226\128\152CN=R3,O=Let’s Encrypt,C=US\226\128\153:"”)

Can you connect to opam.ocaml.org without a certificate warning? That looks like it might be the MacOS ≤10.11 bug with “Let’s encrypt” certificates.

You mean, on my web browser? Sure.

Not sure about that, my MacOS version is 10.14.

I should have checked this thread first before commenting in the other one - now I see you are on MacOS, like myself. I have just one recommendation: install Homebrew without delay, and only use its tools instead of the system ones. The system ones are bitrotted in some cases to the point of being quite useless. This may well be one of such cases.

1 Like

No, I was finally able to install codept after an opam update (followed by an opam upgrade).