我过去通过 opam 安装任何 OCaml 包都没有问题。但是我无法安装 Cryptokit。
我正在使用命令:
$ opam install cryptokit
并且我收到以下错误消息(我不确定它们的含义,也找不到有关错误的任何文档):
[ERROR] The compilation of cryptokit.1.9 failed.
Removing cryptokit.1.9.
ocamlfind remove cryptokit
===== ERROR while installing cryptokit.1.9 =====
# opam-version 1.1.0
# os linux
# command make
# path /home/alpha/.opam/system/build/cryptokit.1.9
# compiler system (4.01.0)
# exit-code 2
# env-file /home/alpha/.opam/system/build/cryptokit.1.9/cryptokit-9111-ffb3fd.env
# stdout-file /home/alpha/.opam/system/build/cryptokit.1.9/cryptokit-9111-ffb3fd.out
# stderr-file /home/alpha/.opam/system/build/cryptokit.1.9/cryptokit-9111-ffb3fd.err
### stdout ###
# ...[truncated]
# mv stubs-md5.o src/stubs-md5.o
# ocamlfind ocamlc -ccopt -O -ccopt -DHAVE_ZLIB -c src/stubs-misc.c
# mv stubs-misc.o src/stubs-misc.o
# ocamlfind ocamlc -ccopt -O -ccopt -DHAVE_ZLIB -c src/stubs-rng.c
# mv stubs-rng.o src/stubs-rng.o
# ocamlfind ocamlc -ccopt -O -ccopt -DHAVE_ZLIB -c src/stubs-zlib.c
# + ocamlfind ocamlc -ccopt -O -ccopt -DHAVE_ZLIB -c src/stubs-zlib.c
# src/stubs-zlib.c:19:18: fatal error: zlib.h: No such file or directory
# compilation terminated.
# Command exited with code 2.
### stderr ###
# E: Failure("Command ''/usr/bin/ocamlbuild' src/libcryptokit_stubs.a src/dllcryptokit_stubs.so src/cryptokit.cma src/cryptokit.cmxa src/cryptokit.a src/cryptokit.cmxs -tag debug -classic-display' terminated with error code 10")
# make: *** [build] Error 1
'opam install cryptokit' failed.