【发布时间】:2012-09-18 14:06:33
【问题描述】:
我创建了我的~/.ocamlinit,如下所示
let interactive = !Sys.interactive;;
Sys.interactive := false;; (*Pretend to be in non-interactive mode*)
#use "topfind";;
Sys.interactive := interactive;; (*Return to regular interactive mode*)
Toploop.use_silently Format.err_formatter (Filename.concat (Findlib.package_directory "batteries") "battop.ml");;
当我在命令行输入ocaml 时,出现以下错误:
$ ocaml
Objective Caml version 3.12.1
Cannot find file topfind.
File ".ocamlinit", line 6, characters 60-85:
Error: Unbound module Findlib
#
是什么导致了这个问题,我应该如何解决这个问题?
(我在使用 Debian Wheezy)
编辑:我为 ocaml 设置了别名:
alias ocaml='rlwrap -H /home/nanda/.ocaml_history -D 2 -i -s 10000 ocaml'
【问题讨论】:
-
在没有
.ocamlinit的情况下启动 toploop 时,首先检查#use "topfind";;是否有效可能会有所帮助。 -
@dkim:奇怪!我检查了,这也不起作用。
-
您是否安装了
ocaml-findlib软件包? packages.debian.org/wheezy/ocaml-findlib -
成功了!!太感谢了。我不确定为什么需要开发包。有这方面的见解吗?
-
一个库通常由两个包组成,一个用于运行时,另一个用于开发文件。 What do the *-dev packages in the Linux package repositories actually contain?
标签: debian ocaml ocaml-batteries