Ocaml camlzip:“;此软件包依赖于可能缺失的外部(系统)依赖关系。”;

Ocaml camlzip:“;此软件包依赖于可能缺失的外部(系统)依赖关系。”;,ocaml,opam,Ocaml,Opam,我正在尝试安装camlzip(一个封装在opam中的OCaml软件包),但是当我运行opam install camlzip The following actions will be performed: ∗ install camlzip 1.05 =-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [camlzip] Archive in cache =-=- Proce

我正在尝试安装camlzip(一个封装在opam中的OCaml软件包),但是当我运行
opam install camlzip

The following actions will be performed:
  ∗  install camlzip 1.05

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[camlzip] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of camlzip failed at "make all".
Processing  1/1: [camlzip: ocamlfind remove]
#=== ERROR while installing camlzip.1.05 ======================================#
# opam-version 1.2.2
# os           linux
# command      make all
# path         /home/mttjone/.opam/system/build/camlzip.1.05
# compiler     system (4.02.3)
# exit-code    2
# env-file     /home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.env
# stdout-file  /home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.out
# stderr-file  /home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.err
### stdout ###
# ocamlc -g -c -ccopt -g -ccopt -I/usr/local/include zlibstubs.c
### stderr ###
# [...]
# zlibstubs.c:151: warning: comparison between pointer and integer
# zlibstubs.c: In function ‘camlzip_inflateEnd’:
# zlibstubs.c:165: warning: implicit declaration of function ‘inflateEnd’
# zlibstubs.c:165: error: ‘z_stream’ undeclared (first use in this function)
# zlibstubs.c:165: error: expected expression before ‘)’ token
# zlibstubs.c:165: error: invalid operands to binary * (have ‘int *’ and ‘int *’)
# zlibstubs.c:165: error: called object ‘<erroneous-expression>’ is not a function
# zlibstubs.c: In function ‘camlzip_update_crc32’:
# zlibstubs.c:172: warning: implicit declaration of function ‘crc32’
# make: *** [zlibstubs.o] Error 2



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
  ∗  install camlzip 1.05
No changes have been performed

=-=- camlzip.1.05 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing. `opam depext camlzip.1.05' may help you find the correct installation for your system.
将执行以下操作:
∗  安装camlzip 1.05
=-=-收集来源=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[camlzip]缓存中的存档
=-=-处理操作-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[错误]camlzip的编译在“全部生成”时失败。
处理1/1:[camlzip:ocamlfind-remove]
#==安装camlzip.1.05时出错======================================#
#opam版本1.2.2
#操作系统linux
#命令生成全部
#path/home/mttjone/.opam/system/build/camlzip.1.05
#编译系统(4.02.3)
#出口代码2
#env文件/home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.env
#标准文件/home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.out
#标准文件/home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.err
###stdout###
#ocamlc-g-c-ccopt-g-ccopt-I/usr/local/include zlibstubs.c
###斯特德尔###
# [...]
#c:151:警告:指针和整数之间的比较
#zlibstubs.c:在函数“camlzip_inflateEnd”中:
#zlibstubs.c:165:警告:函数'inflateEnd'的隐式声明
#zlibstubs.c:165:错误:“z_stream”未声明(此函数首次使用)
#zlibstubs.c:165:错误:在“')标记之前应该有表达式
#zlibstubs.c:165:错误:二进制*的操作数无效(具有“int*”和“int*”)
#zlibstubs.c:165:错误:调用的对象“”不是函数
#zlibstubs.c:在函数“camlzip\u update\u crc32”中:
#c:172:警告:函数“crc32”的隐式声明
#make:**[zlibstubs.o]错误2
=-=-错误报告-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
以下操作失败
∗  安装camlzip 1.05
没有进行任何更改
=-=-camlzip.1.05士兵射击-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=>此程序包依赖于可能缺失的外部(系统)依赖项`opam depext camlzip.1.05'可能会帮助您找到适合您的系统的正确安装。
现在我想很明显,它并没有偶然丢失依赖项,但我可以使用建议的命令,它说我没有丢失任何依赖项

大概问题出在
zlibstubs.c
文件上,但我不确定到底发生了什么

有人能救我吗?

TL;博士 解释
opam install depext
命令将安装能够安装外部依赖项的
opam
插件。它将向
opam
工具添加一个
depext
命令

opam depenxt camlzip将使用系统包管理器安装外部依赖项。如果不支持包管理器,则该命令将失败。在这种情况下,你可以使用

opam list --external --required-by=camlzip

获取包维护人员已知的所有发行版和包管理系统的
camlzip
的所有外部依赖项。根据这些信息,您可以推断出分发包的名称。一旦成功,将这些信息反馈给维护人员也是一个好主意

您的系统可能缺少一个库(不是ocaml库,而是一个系统库)。您是正确的,因为某些原因,他们放弃的机器没有zlib.do
opam source camlzip
查看底部的opam文件,您将看到
depenxts:[…
这些是所需的相应系统库。您可以使用
opam depext
进行此操作,但我忘记了确切的命令
opam list --external --required-by=camlzip