ocamlopam

opam: unknown option `--bare', hence can't initialize


Trying out https://cs3110.github.io/textbook/chapters/preface/install.html#initialize-opam. WSL2, using ubuntu on windows for 6 months. Running opam init --bare -a -y results in

opam: unknown option `--bare', did you mean one of `-b', `--safe', `--make'
      or `--fake' ?
Usage: opam init [OPTION]... [NAME] [ADDRESS]
Try `opam init --help' or `opam --help' for more information.

Have no clue.

Tried ;

[ERROR] Base package base-threads of compiler system not found! Ignored.
[ERROR] Base package base-bigarray of compiler system not found! Ignored.
[ERROR] Base package base-unix of compiler system not found! Ignored.
[ERROR] Inconsistent set of base compiler packages: {} needed but not included / { base-bigarray, base-threads, base-unix } extra
[ERROR] Initialisation failed

Solution

  • You should update opam to at least opam 2 (preferably the last version). Command line interface are not compatible between major versions of opam.