Utop from Ocaml brew throws error

1.5k views Asked by At

I have used ocamlbrew to install ocaml and associated utilities. I had one earlier installation also. As said in the documentation, I have used /opt for installing ocamlbrew. But when I run utop as a normal user, I am getting error

Fatal error: cannot load shared library dllunix
Reason: /usr/local/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_stat_alloc_string

Also

ldconfig -p | grep dllunix

returns nothing

1

There are 1 answers

0
Vitaly Osipov On

This instructions are very good (and work): https://github.com/realworldocaml/book/wiki/Installation-Instructions

Install OPAM from brew, then use it for everything, including OCaml. It's best if you uninstall OCaml you've installed through brew first.