not able to install anything using opam

孤人 提交于 2019-12-08 13:07:38
brew install opam
opam init --comp=4.02.1
eval `opam config env`
ocaml

Update:

Sometimes brewed opam can fail with Illegal Instruction, in that case you need to reinstall opam from sources:

brew reinstall --build-from-source opam

Also, you need a working toolchain, i.e., compiler, autotools and other developer tools. You can try to install it using brew, e.g., brew install autotools, etc. Or you can try to install xcode toolchain, including apple command line developer tools.

I had the same problem trying to install mirage, the problem is because the current directory is not in the CDPATH by default on macOS X. The posix /bin/sh will not "cd src" though can "cd ./src". The quick fix is to do the following before running opam (or just put it in your .bash_profile.

export CDPATH=. opam install WHATEVER

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!