我正在嘗試運行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`