简体   繁体   English

已安装ocamlfind(findlib),但从未在Mac中找到任何额外的软件包

[英]Installed ocamlfind (findlib), but never can find any extra package in Mac

Just got a new Mac, Mountain Lion and I wish to make all ocaml related stuff set up. 刚有了新的Mac,Mountain Lion和我希望设置所有与ocaml相关的东西。

I used the following commands: 我使用了以下命令:

opam switch 4.00.1

opam install findlib

opam install batteries

All are installed successfully without errors. 所有安装成功,没有错误。

But I can't use batteries , bisect , etc. Always say package can't be found . 但是我不能使用batteriesbisect batteries 。总是说package can't be found

Any idea? 任何的想法?

Should I set any path or something? 我应该设置任何path还是什么?


Edit: 编辑:

For more information, I followed these steps: 有关更多信息,我遵循了以下步骤:

1. install homebrew

    http://mxcl.github.com/homebrew/

    ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

2. Emacs for Mac OS X

    http://emacsformacosx.com/

3. Install tuareg-mode

    http://forge.ocamlcore.org/forum/forum.php?forum_id=808

    http://marmalade-repo.org/
    Add to your .emacs: (require 'package) (in home directory)

    (add-to-list 'package-archives 
        '("marmalade" .
          "http://marmalade-repo.org/packages/"))
    (package-initialize)

    M-x eval-buffer to evaluate it, and then do M-x package-refresh-contents to load in the package listing.\

    ** m-x list-packages **

    select tuareg package

    click install

4. Install OCaml, OPam, rlwrap

    make sure XCode command line tool is installed: 
        http://stackoverflow.com/questions/10921690/on-apple-osx-lion-make-not-in-path

    brew install ocaml

    brew install opam

    opam init

    brew install rlwrap

5. Install batteries-included (ocamlfind will be installed automatically)

    http://stackoverflow.com/questions/14947667/cant-load-batteries-using-findlib-in-ocaml-toplevel

    opam switch 4.00.1

    opam install batteries

    http://stackoverflow.com/questions/14751914/opam-package-not-running/14752071#14752071

    http://stackoverflow.com/questions/14840236/ocaml-batteries-installation

    https://github.com/ocaml-batteries-team/batteries-included/blob/master/ocamlinit

    Put the following in ~/.ocamlinit

    #use "topfind";;
    Toploop.use_silently
             Format.err_formatter (Filename.concat (Findlib.package_directory
             "batteries") "battop.ml");;

您是否已运行“ magic”命令来设置环境变量?

eval `opam config env`

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM