ocaml opam install utop

报错

1
2
3
4
5
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of ocaml-migrate-parsetree failed at "jbuilder build -p ocaml-migrate-parsetree -j
4".
[ERROR] The compilation of cppo failed at "jbuilder build -p cppo -j 4".
[ERROR] The compilation of topkg failed at "ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false".

折腾半天,最后误打误撞找到一个解决办法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
 opam switch 4.06.0
eval (opam config env)
~/.opam> opam install utop
The following actions will be performed:
∗ install conf-m4 1 [required by ocamlfind]
∗ install result 1.2 [required by lwt]
∗ install ocamlbuild 0.12.0 [required by react]
∗ install ocamlfind 1.7.3 [required by utop]
∗ install topkg 0.9.1 [required by react]
∗ install jbuilder 1.0+beta16 [required by utop]
∗ install base-bytes base [required by camomile]
∗ install react 1.2.1 [required by utop]
∗ install ocaml-migrate-parsetree 1.0.7 [required by lwt]
∗ install cppo 1.6.0 [required by utop]
∗ install ppx_tools_versioned 5.0.1 [required by lwt]
∗ install camomile 0.8.7 [required by utop]
∗ install lwt 3.1.0 [required by utop]
∗ install zed 1.6 [required by lambda-term]
∗ install lwt_react 1.1.0 [required by utop]
∗ install lambda-term 1.12.0 [required by utop]
∗ install utop 2.0.2
===== ∗ 17 =====
Do you want to continue ? [Y/n] Y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[camomile] Archive in cache
[cppo] Archive in cache
[jbuilder] Archive in cache
[lambda-term] Archive in cache
[lwt] Archive in cache
[lwt_react] Archive in cache
[ocaml-migrate-parsetree] Archive in cache
[ocamlbuild] Archive in cache
[ocamlfind] Archive in cache
[ppx_tools_versioned] Archive in cache
[react] Archive in cache
[result] Archive in cache
[topkg] Archive in cache
[utop] Archive in cache
[zed] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
∗ installed conf-m4.1
∗ installed result.1.2
∗ installed ocamlfind.1.7.3
∗ installed base-bytes.base
∗ installed ocamlbuild.0.12.0
∗ installed jbuilder.1.0+beta16
∗ installed topkg.0.9.1
∗ installed cppo.1.6.0
∗ installed react.1.2.1
∗ installed ocaml-migrate-parsetree.1.0.7
∗ installed camomile.0.8.7
∗ installed ppx_tools_versioned.5.0.1
∗ installed zed.1.6
∗ installed lwt.3.1.0
∗ installed lwt_react.1.1.0
∗ installed lambda-term.1.12.0
∗ installed utop.2.0.2
Done.

=-=- lwt.3.1.0 installed successfully -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
=> Lwt 4.0.0 will make some breaking changes to packaging in late 2017. See
https://github.com/ocsigen/lwt/issues/453