如何安装 Eliom

How to install Eliom

我无法安装 Ocsigen 项目的 eliom

$ opam install eliom
Your request can't be satisfied:
  - No package matches eliom.
$ opam install eliom.5.0.0
Your request can't be satisfied:
  - No package matches eliom.5.0.0.

但令人惊讶的是我可以找到包含以下内容的包裹:

$ opam show eliom
             package: eliom
             version: 5.0.0
          repository: default
        upstream-url: https://github.com/ocsigen/eliom/archive/5.0.0.tar.gz
       upstream-kind: http
   upstream-checksum: dcd4c6b7b09a9ac233cb6db4605c233e
            homepage: http://ocsigen.org/eliom/
         bug-reports: https://github.com/ocsigen/eliom/issues/
            dev-repo: https://github.com/ocsigen/eliom.git
              author: dev@ocsigen.org
             license: LGPL-2.1 with OCaml linking exception
             depends: ocamlfind & camlp4 <= 4.02+6 & deriving >= 0.6 & (base-no-ppx | ppx_tools >= 0.99.3) & js_of_ocaml > 2.6 & tyxml > 3.5.0 & calendar & ocsigenserver >= 2.6 & ipaddr >= 2.1 & reactiveData >= 0.2 & base-bytes
   installed-version: 
  available-versions: 2.2.2, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 4.0.0, 4.1.0, 4.2.0, 5.0.0
         description: Framework for programming Web sites and client/server Web applications.

我做错了什么?

您应该声明:

  • opam --version
  • 获得的opam版本
  • opam switch
  • 得到的当前opam开关

令人困惑的消息是 OPAM 1.2.2 的已知问题:https://github.com/ocaml/opam/issues/2526 .

我猜你使用的是 OCaml 4.03.0。您不能满足使用它安装 eliom.5.0.0 所需的条件。根据 opam info eliom.5.0.0,您需要 OCaml 4.02.x。有关详细信息,请参阅 https://github.com/ocsigen/eliom/issues/324