首页 > 解决方案 > 在 wsl 上使用沙丘时,ctypes 被隐藏(不满足“exist_if”)错误

问题描述

我在我的 Windows 10 机器上使用 wsl ubuntu 并尝试使用沙丘构建一个 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

什么也没做

标签: ocamlwindows-subsystem-for-linuxocaml-dune

解决方案


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


推荐阅读