ctypes is hidden (unsatisfied 'exist_if') 在 wsl 上使用 dune 时出错

ctypes is hidden (unsatisfied 'exist_if') error when using dune on wsl

我在我的 windows 10 机器上使用 wsl ubuntu 并尝试使用 dune 构建一个 ocaml 项目(https://github.com/adamrk/llvm-ocaml-tutorial)。不幸的是,我收到了这个错误:

# dune build bin/kaleidoscope.exe
File "/home/impor/.opam/4.10.0/lib/ctypes/META", line 1, characters 0-0:
Error: Library "ctypes.foreign.threaded" in
/home/impor/.opam/4.10.0/lib/ctypes is hidden (unsatisfied 'exist_if').
-> required by library "ctypes.foreign" in
   /home/impor/.opam/4.10.0/lib/ctypes
-> required by executable kaleidoscope in bin/dune:2
Hint: try: dune external-lib-deps --missing bin/kaleidoscope.exe

我找不到任何关于此的文档,所以我很迷茫。

# dune external-lib-deps --missing bin/kaleidoscope.exe

什么都不做

这是因为没有安装 opam 包 ctypes-foreign