摘要

Erlang是一种通用的面向并发的编程语言,它由瑞典电信设备制造商爱立信所辖的CS-Lab开发,目的是创造一种可以应对大规模并发活动的编程语言和运行环境。

环境准备

系统环境

使用命令:uname -a 或者 uname -r,执行后如下:
linux系统信息指令

安装编译依赖

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 directory
    where wxWidgets libraries are installed (returned by
    'wx-config --libs' or 'wx-config --static --libs' command)
    is in LD_LIBRARY_PATH or equivalent variable and
    wxWidgets 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 available

    wxWidgets must be installed on your system.

    Please check that wx-config is in path, the directoryguest
    where wxWidgets libraries are installed (returned by
    'wx-config --libs' or 'wx-config --static --libs' command)
    is in LD_LIBRARY_PATH or equivalent variable and
    wxWidgets 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
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐