there isn’t any issues for me on Monterrey/M1.
Trying to guess what’s wrong here, did you change terminal between the last
eval `opam env`
and the “Error: Program ocamlc not found” ?
If yes, what might have happened is that
opam init asked you if you wanted to modify your
~/.zshrc file but the default is “no”. See message as to why it is important:
<><> Required setup - please read <><><><><><><><><><><><><><><><><><><><><> 🐫
In normal operation, opam only alters files within ~/.opam.
However, to best integrate with your system, some environment variables
should be set. If you allow it to, this initialisation step will update
your zsh configuration by adding the following line to ~/.zshrc:
[[ ! -r /Users/kit_ty_kate/.opam/opam-init/init.zsh ]] || source /Users/kit_ty_kate/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
Otherwise, every time you want to access your opam installation, you will
need to run:
eval $(opam env)
You can always re-run this setup with 'opam init' later.
Do you want opam to modify ~/.zshrc? [N/y/f]
(default is 'no', use 'f' to choose a different file)
I don’t personally know why it is “no” by default but maybe it can be improved.