Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.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
ocaml电池编译:错误:剩余的ocaml编译文件:_Ocaml_Ocaml Batteries - Fatal编程技术网

ocaml电池编译:错误:剩余的ocaml编译文件:

ocaml电池编译:错误:剩余的ocaml编译文件:,ocaml,ocaml-batteries,Ocaml,Ocaml Batteries,这个电池的编译错误真让我困惑。如何修复错误?您可以执行以下脚本: Build mode: shared ocamlbuild -no-links syntax.otarget byte.otarget src/batteries_help.cmo META shared.otarget Finished, 0 targets (0 cached) in 00:00:00. SANITIZE: a total of 3 files that should probably not be in yo

这个电池的编译错误真让我困惑。如何修复错误?

您可以执行以下脚本:

Build mode: shared
ocamlbuild -no-links syntax.otarget byte.otarget src/batteries_help.cmo META shared.otarget
Finished, 0 targets (0 cached) in 00:00:00.
SANITIZE: a total of 3 files that should probably not be in your source tree
  has been found. A script shell file
  "/home/fanzhihang/batteries-1.4.1/_build/sanitize.sh" is being created.
  Check this script and run it to remove unwanted files or use other options
  (such as defining hygiene exceptions or using the -no-hygiene option).
Warning: Leftover OCaml type annotation files:
  File pa_estring_top.annot in libs/estring has suffix .annot
IMPORTANT: I cannot work with leftover compiled files.
ERROR: Leftover OCaml compilation files:
  File pa_estring_top.cmo in libs/estring has suffix .cmo
  File pa_estring_top.cmi in libs/estring has suffix .cmi
Exiting due to hygiene violations.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:02.
make: *** [all] Error 1
这将删除OCamlbuild认为不应该在这里的文件(即错误所指的.annot、.cmo和.cmi)。

您知道吗

它将自动安装所有依赖项

[编辑] 如何安装opam:

$ opam install batteries

如果我用它安装电池,我可以修复安装路径吗?我没有根权限。已安装的OPAM请按照此处的教程进行操作:./opam64:/lib64/libc.so.6:version
GLIBC_2.7'未找到(由./opam64所需)
code`您不需要是根用户。尝试从源代码编译opam,然后重新尝试
opam安装电池
。我将为opam安装部分编辑我的帖子。您一定要使用
/configure--prefix=$HOME
opam init无法下载,请检查您的连接设置。”opam init'失败
code
我应该如何检查我的连接设置?它可以工作,并且会删除一些安装不正确的文件。但我要回到问题上来:未绑定模块Toploop。你可以在这里回答我的问题:
$ opam install batteries
$ git clone https://github.com/OCamlPro/opam
$ ./configure # (or ./configure --prefix=$HOME if you want to install under your $HOME)
$ make
$ make install
$ opam init
$ eval `opam config -env`