I’m following the Real World Ocaml tutorial but when I try to create an env using opam switch create 4.13.1
it says that “the compilation of ocaml-base-compiler.4.13.1 failed”
I searched similar issues but none of them solved my problem, i don’t know what to do now. What am I doing wrong?
That is the output of opam switch create 4.13.1
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml-base-compiler" {= "4.13.1"} | "ocaml-system" {= "4.13.1"}]
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-options-vanilla.1
⬇ retrieved ocaml-base-compiler.4.13.1 (cached)
[ERROR] The compilation of ocaml-base-compiler.4.13.1 failed at "./configure
--prefix=/home/felipe/.opam/4.13.1 -C".
#=== ERROR while compiling ocaml-base-compiler.4.13.1 =========================#
# context 2.1.0 | linux/x86_64 | | https://opam.ocaml.org#45b9c3d5
# path ~/.opam/4.13.1/.opam-switch/build/ocaml-base-compiler.4.13.1
# command ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix=/home/felipe/.opam/4.13.1 -C
# exit-code 1
# env-file ~/.opam/log/ocaml-base-compiler-10708-9cdcfe.env
# output-file ~/.opam/log/ocaml-base-compiler-10708-9cdcfe.out
### output ###
# [...]
# configure: Configuring OCaml version 4.13.1
# checking build system type... x86_64-pc-linux-gnu
# checking host system type... x86_64-pc-linux-gnu
# checking target system type... x86_64-pc-linux-gnu
# checking for ld... ld
# checking how to print strings... printf
# checking for gcc... no
# checking for cc... no
# checking for cl.exe... no
# configure: error: in `/home/felipe/.opam/4.13.1/.opam-switch/build/ocaml-base-compiler.4.13.1':
# configure: error: no acceptable C compiler found in $PATH
# See `config.log' for more details
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-base-compiler 4.13.1
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray base
│ ∗ install base-threads base
│ ∗ install base-unix base
│ ∗ install ocaml-options-vanilla 1
└─
<><> ocaml-base-compiler.4.13.1 troubleshooting <><><><><><><><><><><><><><><><>
=> A failure in the middle of the build may be caused by build parallelism
(enabled by default).
Please file a bug report at
https://github.com/ocaml/opam-repository/issues
=> You can try installing again including --jobs=1
to force a sequential build instead.
# Run eval $(opam env --switch=4.13.1) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially
installed) [Y/n]
This is the tutorial I’m following: Real World OCaml