Search code examples
ocamlcoqopamdune

How do I install ocamlfind first properly before other opam packages without root permissions?


I was trying to install some coq packages with opam but have this hack:

# coq-equations seems to rely on ocamlfind for it's build, but doesn't
# list it as a dependency, so opam sometimes tries to install
# coq-equations before ocamlfind. Splitting this into a separate
# install call prevents that.
opam install -y coq-equations coq-metacoq coq-metacoq-checker coq-metacoq-template

I don't have root permisions so doing:

sudo apt-get install ocaml-findlib

doesn't work. How do I instal ocamlfind? Ideally the proper way with a package manager if possible?


Solution

  • You can install ocamlfind independently in a first step

    $ opam install ocamlfind
    

    then install the packages that forgot their dependencies on ocamlfind:

    $ opam install -y coq-equations coq-metacoq coq-metacoq-checker coq-metacoq-template