Closed TonalidadeHidrica closed 3 years ago
It's not your fault. The message meant βYou already have OCaml 4.10.0 installed in your system. Do you want OPAM to use the system OCaml compiler (ocaml-system.4.10.0
) or to build a new OCaml compiler (ocaml-base-compiler.4.10.0
)?β
You can specify either opam init --comp ocaml-base-compiler.4.10.0
or opam init --comp ocaml-system.4.10.0
instead of opam init --comp 4.10.0
.
Ok, now I understood why: I've already installed OCaml 4.10.0 via brew
, and now I'm trying to install once more via opam
. I didn't know the difference between system
and base-compiler
, but the former means that I'll just use the already-installed one, while the latter means I'll build a new compiler again, right? Thanks for your help. I'm now closing this issue.
Now I have another problem: it fails to install num
with the following message. But, it's also related with my existing ocaml right? Would you mind telling me how can I fix this as well?
$ opam install satysfi 23:30:27
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> π«
[satysfi.0.0.5] no changes from git+file:///path/to/SATySFi#master
The following actions will be performed:
β install num 1.3 [required by batteries]
β install sexplib v0.14.0 [required by core_kernel]
β install batteries 3.1.0 [required by satysfi]
β install core_kernel v0.14.0 [required by satysfi]
β install satysfi 0.0.5*
===== β 5 =====
Do you want to continue? [Y/n] y
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
[batteries.3.1.0] found in cache
[core_kernel.v0.14.0] found in cache
[num.1.3] found in cache
[sexplib.v0.14.0] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
[ERROR] The installation of num failed at "make findlib-install".
#=== ERROR while installing num.1.3 ===========================================#
# context 2.0.7 | macos/x86_64 | ocaml-system.4.10.0 | https://opam.ocaml.org#f1589d4f
# path ~/.opam/default/.opam-switch/build/num.1.3
# command ~/.opam/opam-init/hooks/sandbox.sh install make findlib-install
# exit-code 2
# env-file ~/.opam/log/num-60435-d6d332.env
# output-file ~/.opam/log/num-60435-d6d332.out
### output ###
# [ERROR] It appears that the num library was previously installed to your system
# compiler's lib directory, probably by a faulty opam package.
# You will need to remove arith_flags.*, arith_status.*, big_int.*,
# int_misc.*, nat.*, num.*, ratio.*, nums.*, libnums.* and
# stublibs/dllnums.* from /usr/local/lib/ocaml.
# make: *** [findlib-install] Error 1
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β β install num 1.3
ββ
βΆβ No changes have been performed
I didn't know the difference between system and base-compiler, but the former means that I'll just use the already-installed one, while the latter means I'll build a new compiler again, right?
Exactly
# [ERROR] It appears that the num library was previously installed to your system
# compiler's lib directory, probably by a faulty opam package.
# You will need to remove arith_flags.*, arith_status.*, big_int.*,
# int_misc.*, nat.*, num.*, ratio.*, nums.*, libnums.* and
# stublibs/dllnums.* from /usr/local/lib/ocaml.
Hmm, it looks that the num
package had already installed by homebrew or something.
Using ocaml-base-compiler.4.10.0
instead of ocaml-system.4.10.0
can probably be the quickest solution.
You're right, ocaml-num
formula was installed in my system. I've tried $ opam switch create ocaml-base-compiler.4.10.0
and watching if it works.
It works! Thanks for your support.
As a OCaml & SaTySFi beginner, I had a trouble even in initializing
opam
. When I triedopam init --comp 4.10.0
, after several interaction, opam claims[ERROR] Compiler selection '4.10.0' is ambiguous. matching packages: { ocaml-base-compiler.4.10.0, ocaml-system.4.10.0 }
. Is it my fault or the official document is incomplete? Thanks in advance.