我正在尝试运行make
涉及的依赖项ocamlfind
,但是当我尝试安装它时,它给了我循环依赖项和对的依赖项ocaml-base-nox
。
我发现我可以用一个命令同时安装相互依赖的
ocaml-findlib
和: 但是,剩余的依赖项返回。它确实提到了几个包,显然:libfindlib-ocaml
sudo apt install ocaml-findlib ocaml-findlib libfindlib-ocaml ocaml-base-nox-4.01.0
Package 'ocaml-base-nox-4.01.0' has no installation candidate
Package ocaml-base-nox-4.01.0 is a virtual package provided by:
ocaml-base-nox 4.01.0-3ubuntu3.1 [Not candidate version]
ocaml-base-nox 4.01.0-3ubuntu3 [Not candidate version]
帮助安装该软件包的答案可能会有所帮助。否则,向我揭示如何让 make 识别已opam
安装实例的答案可能会有所帮助。如您所见,该安装确实有效:
vagrant@vagrant-ubuntu-trusty-64:~/projectfolder$ opam list
# Installed packages for system:
base-bigarray base Bigarray library distributed with the OCaml compiler
base-threads base Threads library distributed with the OCaml compiler
base-unix base Unix library distributed with the OCaml compiler
conf-m4 1 Virtual package relying on m4
ocamlfind 1.7.3 A library manager for OCaml
如您所见,我能够通过 opam 成功安装 ocamlfind。有趣的是,我的 make 命令似乎无法识别ocamlfind
我在安装时添加到环境中的内容opam
:
/path/to/some/folder/which/is/super/secret -O2 -d acommand file.f
[Error] Critical: Error starting ocamlopt process: Cannot run program
"ocamlfind" (in directory
"/path/to/some/folder/."): error=2, No such file
or directory (Cannot run program "ocamlfind" (in directory
"/path/to/some/folder/."): error=2, No such file
or directory)
make: *** [some/folder/timestamp] Error 113
答案1
出现此问题的原因是您的环境变量设置不正确。为此,运行以下命令即可:
eval `opam config env`