简体   繁体   中英

Ubuntu Server - Opam installation issue

I am installing Ubuntu 18.04
I have done this before, and never had this issue, the installation of OPAM has always gone smoothly, except this time.

I run the code to install OPAM.

sudo apt install opam

The installation does not give any errors, everything seems to go normally.

Then I run this.

opam init

and this is my output

Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[WARNING] Recommended dependencies -- most packages rely on these:
            - m4


=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
[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
OpamGlobals.Exit(66)

Once this errors out, I am stuck and can not go any further.
As I mentioned at the top, I have installed this version of the server many times in the past, and installed OPAM without an issue, until now.
This is through Virtualbox, so I deleted the installment and reinstalled it again, thinking that maybe there was a bad install. But, I get the same error.

I did some researching through Google, and cannot find this exact issue, but found similar ones with this OPAM build issue.

An update. Performing as suggested by AndreasKralj

opam init --comp $1.2.2
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[WARNING] Recommended dependencies -- most packages rely on these:
            - m4   
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
Cannot find /home/darkness/.opam/compilers/.2.2/.2.2/.2.2.comp: .2.2 is not a valid compiler name.
[ERROR] Initialisation failed
OpamGlobals.Exit(1)

Any idea's on this one, will be greatly appreciated.
Wayne

要解决此问题,您需要执行opam init --comp 1.2.2以确保ocaml已正确安装并设置为所需的版本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM