# Ocaml version issue with codept

**URL:** <https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722>\
**Category:** Learning\
**Created:** [October 28, 2022, 12:55pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722 "2022-10-28T12:55:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathandoyle](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jonathandoyle](https://discuss.ocaml.org/u/jonathandoyle)\
**Post date:** [October 28, 2022, 12:55pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/1 "2022-10-28T12:55:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![octachron](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@octachron](https://discuss.ocaml.org/u/octachron)\
**Post date:** [October 28, 2022, 1:10pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/2 "2022-10-28T13:10:14Z")

</div>

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

```auto
opam pin --dev-repo codept

```

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

---

<div class="post-metadata">

**Author:** ![jonathandoyle](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jonathandoyle](https://discuss.ocaml.org/u/jonathandoyle)\
**Post date:** [October 28, 2022, 1:23pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/3 "2022-10-28T13:23:47Z")

</div>

> [@octachron](#):
>
> If you are using the OCaml 5.0.0 beta

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

---

<div class="post-metadata">

**Author:** ![octachron](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@octachron](https://discuss.ocaml.org/u/octachron)\
**Post date:** [October 28, 2022, 1:25pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/4 "2022-10-28T13:25:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonathandoyle](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jonathandoyle](https://discuss.ocaml.org/u/jonathandoyle)\
**Post date:** [October 28, 2022, 1:28pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/5 "2022-10-28T13:28:46Z")

</div>

> [@octachron](#):
>
> 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 \>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\>\<\> 🐪  
> [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](https://opam.ocaml.org/index.tar.gz) -U opam/2.0.0" exited with  
> code 5 "ERROR: cannot verify [opam.ocaml.org](http://opam.ocaml.org)’s certificate, issued by \226\128\152CN=R3,O=Let’s Encrypt,C=US\226\128\153:"”)

---

<div class="post-metadata">

**Author:** ![octachron](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@octachron](https://discuss.ocaml.org/u/octachron)\
**Post date:** [October 28, 2022, 1:43pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/6 "2022-10-28T13:43:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonathandoyle](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jonathandoyle](https://discuss.ocaml.org/u/jonathandoyle)\
**Post date:** [October 28, 2022, 1:48pm UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/7 "2022-10-28T13:48:29Z")

</div>

> [@octachron](#):
>
> Can you connect to [opam.ocaml.org](http://opam.ocaml.org) without a certificate warning?

You mean, on my web browser? Sure.

> [@octachron](#):
>
> That looks like it might be the MacOS ≤10.11 bug with “Let’s encrypt” certificates.

Not sure about that, my MacOS version is 10.14.

---

<div class="post-metadata">

**Author:** ![nobrowser](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/nobrowser/32/2099_2.png) [@nobrowser](https://discuss.ocaml.org/u/nobrowser)\
**Post date:** [October 29, 2022, 1:28am UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/8 "2022-10-29T01:28:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jonathandoyle](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jonathandoyle](https://discuss.ocaml.org/u/jonathandoyle)\
**Post date:** [October 30, 2022, 9:01am UTC](https://discuss.ocaml.org/t/ocaml-version-issue-with-codept/10722/9 "2022-10-30T09:01:12Z")

</div>

> [@octachron](#):
>
> Does the error still happen after an `opam update`?

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