LoginSignup
2
1

More than 5 years have passed since last update.

Debian Linux9系(stretch)でElixir 1.7をいごかした

Last updated at Posted at 2018-11-26

Debian Linux 9系(stretch)で最新のElixir1.7をいごかしました。

ざっくりまとめると

  • Debian9標準のapt-getでインストールできるElixirは1.3系
  • Elixir公式サイトの手順でインストールできるElixirは1.6系
  • Debian9 testingでインストールできるElixirは1.7系(sidも1.7系)
  • Debian9 testingでインストールする場合、先にerlang-baseをインストールする必要がある
  • できた:hugging:

環境

Debian Linuxのバージョンは9.6。

root# cat /etc/debian_version
9.6

はじめに

Debian9系(stretch)で最新のElixir1.7系をいごかしかきまとめます。

インストール方法の選定

Debian9標準のapt-getでインストールできるElixirは1.3系なのでNG。Elixir公式サイトの手順でインストールできるElixirは1.6系だったのでこれもNG。Debian9 testingな環境だと1.7.4をインストールできるとのことなのでこちらを採用しました。

セットアップとインストール

基本的にはstableを使うための設定を記載します(ファイルがないので作成する)。

root# vi /etc/apt/apt.conf.d/99target
APT::Default-Release "stable";

/etc/apt/sources.listにtesting用の行を追記(testingのコードネームはbusterらしい)した後、アップデートを実行します。

root# vi /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian buster main

root# apt-get update

erlang-baseをインストールした後elixirをインストールします。

erlang-baseをインストールせずにapt-get install elixir/busterをすると、古いバージョンのerlangがインストールされてしまいelixirが実行できない状態になるので、先にapt-get install erlang-base/busterを実行する必要があります。

やってしまった場合は…
apt-get remove elixirapt-get autoremoveを実行して依存関係を含めたパッケージをアンインストールした後erlang-baseから順にインストールします。

!!!インストールの順番大切!!!
root# apt-get install erlang-base/buster
root# apt-get install elixir/buster

実行できるかどうかの確認とバージョンの確認をします。

root# iex --version
Erlang/OTP 21 [erts-10.1.1] [source] [smp:1:1] [ds:1:1:10] [async-threads:1]

IEx 1.7.4 (compiled with Erlang/OTP 21)

まとめ

  • Debian9系(stretch)で最新のElixir1.7系が実行できるようになりました:hugging:
2
1
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
1