I’m trying to install caml-mode on emacs using opam, and it fails with “sandbox-exec: execvp() of ‘emacs’ failed: No such file or directory”. I don’t know enough about opam or installing emacs packages to have any idea how to proceed from that. Any suggestions? Or should I take this to an emacs forum?
In case it’s helpful, I’m using emacs 27.2.1 on a Mac running macOS 11.6 Big Sur.
Thank you all for the helpful suggestions! As dbuenzli suspected, the problem was that emacs wasn’t in my PATH. (That’s because I’m using a Mac and have been starting emacs the Mac way rather than the Unix way.) I added it to PATH, and then “opam install caml-mode user-setup” worked without problem.