OCamlのインストール-2022年版(Ubuntu20.4)
OCamlのインストール-2022年版(Ubuntu20.4)
$ sudo add-apt-repository ppa:avsm/ppa
$ sudo apt-get update
$ sudo apt install opam
$ opam init -y
$ opam switch list-available ocaml-base-compiler
$ opam switch create 4.13.1
$ eval $(opam env --switch=4.13.1)
$ opam install depext <== これは必要ない
[ERROR] depext unmet availability conditions, e.g. 'opam-version >= "2.0.0~beta5" &
opam-version < "2.1"'
エラーが出たので、以下のサイトを参考にした。 https://githubhot.com/repo/goblint/analyzer/issues/309
$ opam install opam-depext <== これは必要ない
<><> opam-depext.1.2.1 installed successfully <><><><><><><><><><><><><><><><><>
=> opam-depext is unnecessary when used with opam >= 2.1. Please use opam install directly
instead
え?必要ないの?じゃあ、アンインストールするか。
$ opam uninstall opam-depext
それから、以下を実行。
$ opam install user-setup
$ opam install menhir dune ounit tuareg
(ここのところ、$ opam depext menhir dune ounit tuareg と書かれてあったが、 opam depexe は opam 2.1未満のバージョンのための下位互換性を保つためのものだ ということで、opamを直接呼び出せということである。
You are using opam 2.1+, where external dependency handling has been integrated: consider calling opam directly, the 'depext' plugin interface is provided for backwards compatibility only
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=ubuntu, os-family=debian
# The following system packages are needed:
$ opam install merlin
$ opam user-setup install
参考
カテゴリー: memo, OCaml, Ubuntu
タグ: install, ocaml, ubuntu
カウント: 207