LoginSignup
2
0

Ubuntu22にElixirをインストール(asdfで)

Last updated at Posted at 2023-10-21

参考

困ったこと

Elixirをインストールする際に、毎回検索して入れ方を探している。

原因

ちゃんとメモっておかないから

対応

ここにコマンドをメモっておく

必要なパッケージをインストールする

sudo apt install -y libssl-dev make automake autoconf libncurses5-dev g++ gcc curl git

asdfをgit clone してくる(今回はv0.13.1 versionはgitで確認して最新入れる)

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1

~/.bashrcにasdfを追記

ASDF_DIR=$HOME/.asdf
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"

source ~/.bashrc

Plug-inを追加する

asdf plugin add erlang
asdf plugin add elixir

erlangのインストールできるversionを確認する

asdf list-all erlang

erlangをインストールする

asdf install erlang 26.1.2

Elixirのインストールできるversionを確認する

asdf list-all elixir

Elixirをインストールする

asdf install elixir 1.15.7-otp-26

asdfの標準利用に設定する

asdf global erlang 26.1.2
asdf global elixir 1.15.7-otp-26

asdfで利用する現在のversionを確認する

asdf current

確認する

$ iex
Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:24:24] [ds:24:24:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.15.7) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0