fedora30(linux):编译安装erlang23.2(emulator11.1.4)
一,关于erlang 1,官网:
https://www.erlang.org/
2,erlang的下载地址:
http://erlang.org/download/
复制最新的稳定版的安装包地址:
http://erlang.org/download/otp_src_23.2.tar.gz
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
说明:作者:刘宏缔 邮箱: 371125307@qq.com
二,下载erlang:
[root@localhost redismock]# cd /usr/local/source/ [root@localhost source]# wget http://erlang.org/download/otp_src_23.2.tar.gz
三,安装erlang: 1,解压:
[root@localhost source]# tar -zxvf otp_src_23.2.tar.gz
2,配置、编译、安装 进入源码目录:
[root@localhost source]# cd otp_src_23.2/
创建安装目录:
[root@localhost otp_src_23.2]# mkdir /usr/local/soft/erlang
配置:
[root@localhost otp_src_23.2]# ./configure --prefix=/usr/local/soft/erlang
安装:
[root@localhost otp_src_23.2]# make && make install
3,测试安装是否成功:
[root@localhost otp_src_23.2]# /usr/local/soft/erlang/bin/erl Erlang/OTP 23 [erts-11.1.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe] Eshell V11.1.4 (abort with ^G) 1>
四,安装过程中的报错: 1,报错:
configure: error: No curses library functions found ERROR: /usr/local/source/otp_src_23.2/erts/configure failed! 已杀死
解决:
[root@localhost otp_src_23.2]# dnf install ncurses-devel
五,配置bin路径:
[root@localhost otp_src_23.2]# vi /etc/profile
内容:增加两行:
export ERL_PATH=/usr/local/soft/erlang/bin export PATH=$ERL_PATH:$PATH
使生效
[root@localhost otp_src_23.2]# source /etc/profile
测试效果
[root@localhost otp_src_23.2]# erl Erlang/OTP 23 [erts-11.1.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe] Eshell V11.1.4 (abort with ^G) 1>
六,查看erlang的版本:
[root@localhost otp_src_23.2]# erl -version Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.1.4
七,查看linux的版本:
[root@localhost otp_src_23.2]# more /etc/redhat-release Fedora release 30 (Thirty)