系统相关
首页 > 系统相关> > centos7 编译安装erlang 24.1.4

centos7 编译安装erlang 24.1.4

作者:互联网

erl 23和erl 24 相差一个大版本,包括高性能提升使用的模块也是不一样的了。
erl 23 以及之前 使用的是hipe,erl 24之后使用的是jit。

下载地址:https://github.com/erlang/otp/releases/download/OTP-24.1.4/otp_src_24.1.4.tar.gz


首先安装其他依赖包

yum -y install unixODBC unixODBC-devel
# 新版本erl 24需要用到c++17 需要安装下面工具
yum install centos-release-scl -y
yum install unixODBC-devel
yum install mesa-libGLU-devel-9.0.1-1.ky10.aarch64
yum install mesa-libGLU-devel
yum install mesa * 
yum install freeglut* 
yum install devtoolset-7 -y
# 进去 devtoolset-7 使用最新版的c++
scl enable devtoolset-7 bash

现在我们就需要安装wxWidgets:

1.下载wxWidgets-3.0.5.tar.bz2

wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2(如果wget很慢以致失败的话,用Windows点击下载再传到linux系统机器上)

 

2.解压

tar xjfv wxWidgets-3.0.5.tar.bz2

 

3.安装依赖

yum -y install gtk2-devel binutils-devel

 

4.编译安装

cd wxWidgets-3.0.5/

./configure --with-opengl --enable-debug --enable-unicode

make && make install

 

tar -zxf otp_src_24.1.4.tar.gz
cd otp_src_24.1.4

./configure --without-java --with-ssl --prefix=/www/server/erlang --enable-kernel-poll --enable-threads --enable-smp-support --enable-jit --enable-webview

 

剩下的 警告不用管

wx             : No OpenGL headers found, wx will NOT be usable
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 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.
erts           : 
                 JIT disabled due to lack of compiler with C++17 support

*********************************************************************
*********************************************************************
**********************  DOCUMENTATION INFORMATION  ******************
*********************************************************************

documentation  : 
                 fop is missing.
                 Using fakefop to generate placeholder PDF files.

*********************************************************************

 

echo 'export PATH=$PATH:/usr/local/erlang/bin' >> /etc/profile
source /etc/profile

 

source /etc/profile

安装完成

使用 erl命令测试一下

Erlang/OTP 24 [erts-12.1.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]

Eshell V12.1.4  (abort with ^G)
1> 
1> 
1> 

 

标签:enable,wxWidgets,tar,--,24.1,centos7,yum,install,erlang
来源: https://www.cnblogs.com/mouseOrCat/p/15515881.html