我在 6 個月前安裝了 merlin,以便能夠編譯 Ocaml,我沒有遇到任何問題。我最近升級以更新所有內容,但無法使軟體包正常作業。
當我嘗試重新安裝它時,我收到此錯誤訊息(opam install -y merlin):
[coq-released] synchronised from https://coq.inria.fr/opam/released
[default] no changes from https://opam.ocaml.org
The following actions will be performed:
? install ocaml-base-compiler 4.12.0 [required by ocaml]
? install ocaml-config 2 [required by ocaml]
? install ocaml 4.12.0 [required by merlin]
? install ocamlfind 1.9.3 [required by dot-merlin-reader]
? install dune 2.9.3 [required by merlin]
? install result 1.5 [required by merlin]
? install easy-format 1.3.2 [required by yojson]
? install csexp 1.5.1 [required by merlin]
? install cppo 1.6.8 [required by yojson]
? install biniou 1.2.1 [required by yojson]
? install yojson 1.7.0 [required by merlin]
? install dot-merlin-reader 4.1 [required by merlin]
? install merlin 4.4-412
===== ? 13 =====
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> ??
? retrieved biniou.1.2.1 (cached)
? retrieved csexp.1.5.1 (cached)
? retrieved dot-merlin-reader.4.1 (cached)
? retrieved cppo.1.6.8 (cached)
? retrieved easy-format.1.3.2 (cached)
? retrieved dune.2.9.3 (cached)
? retrieved ocaml-base-compiler.4.12.0 (cached)
? retrieved result.1.5 (cached)
? retrieved ocamlfind.1.9.3 (cached)
? retrieved yojson.1.7.0 (cached)
? retrieved merlin.4.4-412 (cached)
[ERROR] The installation of ocaml-base-compiler failed at "make install".
#=== ERROR while installing ocaml-base-compiler.4.12.0 ========================#
# context 2.1.2 | macos/arm64 | | https://opam.ocaml.org#71d8d30e
# path ~/.opam/4.12.0/.opam-switch/build/ocaml-base-compiler.4.12.0
# command ~/.opam/opam-init/hooks/sandbox.sh install make install
# exit-code 2
# env-file ~/.opam/log/ocaml-base-compiler-11755-86d59b.env
# output-file ~/.opam/log/ocaml-base-compiler-11755-86d59b.out
### output ###
# if test -f ocamlnat ; then \
# [...]
# "/Users/theosouchon/.opam/4.12.0/lib/ocaml"; \
# /usr/bin/install -c -m 644 \
# toplevel/opttopstart.cmx toplevel/opttopstart.o \
# "/Users/theosouchon/.opam/4.12.0/lib/ocaml/compiler-libs"; \
# fi
# cd "/Users/theosouchon/.opam/4.12.0/lib/ocaml/compiler-libs" && \
# ranlib ocamlcommon.a ocamlbytecomp.a ocamloptcomp.a
# ranlib: error: exactly one archive should be specified
# make[2]: *** [installoptopt] Error 1
# make[1]: *** [installopt] Error 2
# make: *** [install] Error 2
如果您有解決此問題的想法,我很感興趣
非常感謝你, 西奧 Souchon
uj5u.com熱心網友回復:
您遇到的問題與梅林本身無關。問題是您無法使用 llvm 工具鏈構建編譯器,該工具鏈在您的機器上默認使用。
該ranlib
工具的 GNU 版本能夠接受多個存檔引數,不像 llvm 版本ranlib
在多個存檔上失敗。
一般的答案是您應該安裝并選擇 GNU 工具鏈來構建 OCaml。我會從跑步開始我的調查,which ranlib
以了解您為什么ranlib
在 PATH 中出現故障。您也可能曾經brew
安裝過 llvm 工具鏈,然后使用它brew unlink
來撤消此操作。最后,您希望ranlib
在您的路徑中為ranlib --version
prints GNU ranlib
,而不是LLVM
.
此外,在 macOS 中,有一個名為的工具xcode-select
可讓您安裝和選擇工具鏈。我沒有可用的最新版本的 macOS,所以我不能確定,但??您可以嘗試運行xcode-select --install
以安裝工具鏈并使用xcode-select --switch
來選擇合適的工具鏈。
綜上所述,OCaml和opam問題跟蹤器比 SO 是解決此類問題的好地方。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/427994.html
上一篇:在macOS應用程式上使用.searchable時,有什么方法可以控制搜索欄位的寬度,因為它被添加到工具列?
下一篇:CryptoServicesRegistrar.isInApprovedOnlyMode()和CryptoServicesRegistrar.setApprovedOnlyMode(true)已在充氣