摘要
Erlang是一种通用的面向并发的编程语言,它由瑞典电信设备制造商爱立信所辖的CS-Lab开发,目的是创造一种可以应对大规模并发活动的编程语言和运行环境。
环境准备
系统环境
使用命令:uname -a
或者 uname -r
,执行后如下:
安装编译依赖
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget
下载
下载地址 : 官网下载
$ wget https://erlang.org/download/otp_src_25.1.tar.gz
解压
$ tar -xzvf otp_src_25.1.tar.gz
$ cd otp_src_25.1
$ ./configure --prefix=/usr/local/erlang
这里执行后 会出现一些警告信息:
root@test-vmware71:/usr/local/otp_src_25.1# ./configure --prefix=/usr/local/erlang
config.status: creating c_src/Makefile
configure: WARNING: No GLU headers found, wx will NOT be usable
configure: WARNING:wxWidgets must be installed on your system.Please check that wx-config is in path, the directorywhere wxWidgets libraries are installed (returned by'wx-config --libs' or 'wx-config --static --libs' command)is in LD_LIBRARY_PATH or equivalent variable andwxWidgets version is 3.0.2 or above.*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************jinterface : No Java compiler found
odbc : ODBC library - link check failed*********************************************************************
*********************************************************************
********************** APPLICATIONS INFORMATION *******************
*********************************************************************wx : No GLU headers found, wx will NOT be usable
wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be availablewxWidgets must be installed on your system.Please check that wx-config is in path, the directoryguestwhere wxWidgets libraries are installed (returned by'wx-config --libs' or 'wx-config --static --libs' command)is in LD_LIBRARY_PATH or equivalent variable andwxWidgets version is 3.0.2 or above.*********************************************************************
*********************************************************************
********************** DOCUMENTATION INFORMATION ******************
*********************************************************************documentation : fop is missing.Using fakefop to generate placeholder PDF files.*********************************************************************
跳过继续执行!!!
编译与安装
make && make install
配置环境变量
$ vim /etc/profile
在后面追加内容:
export ERLANG_HOME=/usr/local/erlang
export PATH=$ERLANG_HOME/bin:$PATH
然后执行刷新配置
$ source /etc/profile
验证Erlang
erl -version