git clone https://github.com/erlang/otpcd otp git tag git checkout -b OTP-18.2.2 OTP-18.2.2./otp_build all export LANG=en ./configure --prefix=/usr/local/otp-18.2.2 make make install make install-docs
上面的好像有錯,貼一個從erlang官網下載的編譯過程吧:java
tar xzf otp_src_18.3.tar.gz export LANG=en cd otp_src_18.3 export ERL_TOP=`pwd` ./configure --prefix=/usr/local/otp_src_18.3 && make clean make && make tests && make install && make install-docs
能夠看wiki編譯:Installationc++
aptitude install autoconf libncurses-dev build-essential \ libssl-dev libwxgtk3.0-dev libgl1-mesa-dev \ libglu1-mesa-dev libpng3 default-jdk g++ libxml2-utils apt-get build-dep erlang cd otp # Bourne Shell export ERL_TOP=$PWD export PATH=$ERL_TOP/bin:$PATH ./otp_build autoconf #編譯源碼, -j4 是使用4核cpu ./configure make clean make -j4 && make -j4 tests # 生成文檔時,使用英文語系 export LANG=en make -j4 docs sudo make install && sudo make install-docs
結合上面的能夠編譯。git
上面是在debian上編譯,這裏貼一下centos 6的安裝依賴包:github
yum groupinstall -y "Development Tools" yum install m4 openssl openssl-devel unixODBC unixODBC-devel \ make gcc gcc-c++ kernel-devel ncurses-devel libxslt \ fop java-1.8.0-openjdk-devel wxGTK-gl wxGTK-devel tk