在Ubuntu 下 Erlang R16B 的安裝的過程記錄。
安裝相關類庫
# install libraries and tools
sudo apt-get install libncurses5-dev m4 fop freeglut3-dev libwxgtk2.8-dev g++ libssl-dev xsltproc build-essential tk8.5 unixodbc unixodbc-dev libxml2-utils
下載erlang
# download source code
wget http://erlang.org/download/otp_src_R16B.tar.gz
tar zxvf otp_src_R16B.tar.gz
cd otp_src_R16B/
編譯安裝
# compile and install
./configure --prefix=/opt/erlang
make
make install
清理安裝包
# clean
cd ..
rm -r otp_src_R16B
rm otp_src_R16B.tar.gz
更新環境變量
vim /etc/profile
在最後一行加上
export PATH=/opt/erlang/bin:$PATH
alias ls='ls -color=auto'
alias ll='ll -lht'
保存退出後
source /etc/profile
命令行中輸入erl看是否安裝成功
備注:
編譯過程中如果遇到
/bin/bash: jar: command not found 見 http://www.linuxidc.com/Linux/2013-05/84234p2.htm