OCaml Utop installation topkg failure

I’m trying to download Utop to use Ocaml with vscode for Mac. When I run opam install utop, I get this error.

Hello @Whitney_Schwitter,

I suspect that some of the packages installed via opam were installed as superuser (running sudo opam install <package>).

opam is supposed to be used as a regular user (see opam - FAQ). To start again with a clean state, I suggest that you remove the directory ~/.opam and then run opam init. After that, just install whatever you want by running opam install <package>.

Just keep in mind that to avoid getting in trouble with opam, never run sudo opam <sub-command>.

I hope this will help :slight_smile:


Thank you so much! This worked for me.