Open TheLortex opened 2 years ago
The root cause is an error during opam init
, which is not reported properly: https://github.com/tarides/ocaml-platform-installer/pull/79
With this patch, I now get:
ocaml-platform: [DEBUG] Running: 'opam' 'init' '--yes' '-q' '--color=never' '--root' '/root/.opam'
ocaml-platform: [DEBUG] Error in execution:
# bwrap: Creating new namespace failed: Operation not permitted
### output ###
# output-file /tmp/opam-xxx-11/ocaml-system-11-8b8a2d.out
# env-file /tmp/opam-xxx-11/ocaml-system-11-8b8a2d.env
# exit-code 1
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# path ~/.opam/default/.opam-switch/build/ocaml-system.4.11.1
# context 2.0.8 | linux/x86_64 | | https://opam.ocaml.org#6447b747
#=== ERROR while compiling ocaml-system.4.11.1 ================================#
[ERROR] The compilation of ocaml-system failed at "/root/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml".
[NOTE] Will configure from built-in defaults.
[WARNING] Running as root is not recommended
ocaml-platform: [ERROR] Command 'opam init --yes -q --color=never --root /root/.opam' failed: exited with 31
As a workaround for now, you can init opam manually with opam init --disable-sandboxing
and run ocaml-platform
again.
I'm trying to easily install the platform in a debian Github Codespace (https://github.com/features/codespaces). The platform installer is not working as expected. When running it, it fails with the following error message:
When running the opam command manually I get
[ERROR] Opam has not been initialised, please run 'opam init'