Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Makefile 未能编译:ocamlfind:Package`xmlm';找不到_Makefile_Compiler Errors_Compilation_Ocaml_Ocamlfind - Fatal编程技术网

Makefile 未能编译:ocamlfind:Package`xmlm';找不到

Makefile 未能编译:ocamlfind:Package`xmlm';找不到,makefile,compiler-errors,compilation,ocaml,ocamlfind,Makefile,Compiler Errors,Compilation,Ocaml,Ocamlfind,我试图通过命令行远程计算机使用make命令编译OCaml.ml文件,但它显示了以下错误: + ocamlfind ocamlc -c -package xmlm -package unix -o pms.cmo pms.ml ocamlfind: Package `xmlm' not found Command exited with code 2. Hint: Recursive traversal of subdirectories was not enabled for this buil

我试图通过命令行远程计算机使用
make
命令编译OCaml
.ml
文件,但它显示了以下错误:

+ ocamlfind ocamlc -c -package xmlm -package unix -o pms.cmo pms.ml
ocamlfind: Package `xmlm' not found
Command exited with code 2.
Hint: Recursive traversal of subdirectories was not enabled for this build,
  as the working directory does not look like an ocamlbuild project (no
  '_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,
  you should add the option "-r" or create an empty '_tags' file.
  
  To enable recursive traversal for some subdirectories only, you can use the
  following '_tags' file:
  
      true: -traverse
      <dir1> or <dir2>: traverse
      
Compilation unsuccessful after building 6 targets (5 cached) in 00:00:00.
Makefile:10 : la recette pour la cible « native » a échouée
make: *** [native] Erreur 10
但我也有一个错误:

# opam-version    1.2.2
# os              linux
File /p/opas/src/Ocaml/opam-ocaml-4.04-strech/config does not exist
config
文件确实存在于目录中

需要帮忙吗?!!
感谢您

要通过opam提供软件包(假设opam已正确安装和配置),您需要:

  • 安装软件包
  • 激活你的opam
  • 要安装名为foo的包,请在shell中执行以下命令

    opam install foo
    
    要激活opam安装(启用搜索路径),请发出以下命令

    eval $(opam config env)
    
    或者,使用现代opam(即2.x版),只需
    eval$(opam env)

    在执行此操作之前,您需要正确初始化opam安装,即安装编译器(或使用系统编译器)和基本软件包。这是通过
    opam init
    命令完成的,该命令在您的家中创建一个由opam管理的子目录,例如,使用(按照今天的标准是旧的)OCaml版本4.04.0,您可以这样初始化它

    opam init --comp=4.04.0
    
    初始化完成后,不要忘记通过
    eval$(opam config env)
    激活它,现在您可以安装该软件包了

    最后,您正在使用的
    opam
    版本已经过时,很久以前就被弃用了,因此它不会收到更新,并且该版本可以理解的存储库已冻结,不再更新。您确实需要将opam更新为2.x版本。请按照获取最新版本

    opam init --comp=4.04.0