LoginSignup
10
10

More than 5 years have passed since last update.

anyenvとkerlとの組み合わせで最新erlangをインストールする

Last updated at Posted at 2016-06-10

anyenvで global とか使い方統一したいし、やっぱりkerlでソースまで探してきてほしいというわがまま向けで、両方合わせたらうまくいったのでメモします。

環境は、CentoOS6,7

合わせるって?

ソース取得とコンパイルまでは、kerlで行い、インストールをerlenvの中にします。

anyenvのインストール

git clone https://github.com/riywo/anyenv ~/.anyenv
echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(anyenv init -)"' >> ~/.bash_profile
exec $SHELL -l

参照
http://qiita.com/luckypool/items/f1e756e9d3e9786ad9ea

erlenvのインストール

anyenv install erlenv
exec $SHELL -l

kerlのインストール

curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl

参照
http://qiita.com/tatsuya6502/items/f15da8ea6e793c5038a2

erlangの依存関係インストール

erlangコンパイルに依存関係がある。

sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
sudo yum install curl git

最新を探す

./kerl list releases
R10B-0 R10B-10 R10B-1a R10B-2 R10B-3 R10B-4 R10B-5 R10B-6 R10B-7 R10B-8 R10B-9 R11B-0 R11B-1 R11B-2 R11B-3 R11B-4 R11B-5 R12B-0 R12B-1 R12B-2 R12B-3 R12B-4 R12B-5 R13A R13B01 R13B02-1 R13B02 R13B03 R13B04 R13B R14A R14B01 R14B02 R14B03 R14B04 R14B_erts-5.8.1.1 R14B R15B01 R15B02 R15B02_with_MSVCR100_installer_fix R15B03-1 R15B03 R15B R16A_RELEASE_CANDIDATE R16B01 R16B02 R16B03-1 R16B03 R16B 17.0-rc1 17.0-rc2 17.0 17.1 17.3 17.4 17.5 18.0 18.1 18.2.1 18.2 18.3
Run './kerl update releases' to update this list from erlang.org

ビルド

./kerl build 17.5 17.5

インストール

ここがミソでerlenvの中にインストール

./kerl install 17.5 ~/.anyenv/envs/erlenv/releases/17.5

実行

erlenv global 17.5
erlenv rehash

$ erl
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.4  (abort with ^G)
1>

やったー!

10
10
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
10
10