Erlang 下载地址:
https://github.com/erlang/otp/releases/tag/OTP-25.2.3
一、Kylin10需要安装的package,一次装全不用返工。
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel
二、Erlang 25.2.3 编译步骤:
cd /soft/otp_src_25.2.3
./configure --prefix=/opt/erlang25
make
make install
三、Erlang 25.2.3 测试:
root@kylin101 otp_src_25.2.3]# erl
-bash: erl: command not found
[root@kylin101 otp_src_25.2.3]# export PATH=/opt/erlang25/bin:$PATH
[root@kylin101 otp_src_25.2.3]# erl
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns]
Eshell V13.1.5 (abort with ^G)
1> [X || X <- [1,2,3,4,5,6,7,8,9,10], X rem 2 =:= 0].
[2,4,6,8,10]
2>
附件:在Kylin10 编译Erlang 25.2.3 具体步骤输出:
[root@kylin101 soft]# ls
otp_src_25.2.3 otp_src_25.2.3.tar.gz
[root@kylin101 soft]# cd otp_src_25.2.3/
[root@kylin101 otp_src_25.2.3]# pwd
/soft/otp_src_25.2.3
[root@kylin101 otp_src_25.2.3]# ls
AUTHORS bootstrap configure.src erlang_ls.config erts lib make otp_build OTP_VERSION plt README.md TAR.include
bin configure CONTRIBUTING.md erl-build-tool-vars.sh HOWTO LICENSE.txt Makefile.in otp_patch_apply otp_versions.table prebuilt.files system xcomp
[root@kylin101 otp_src_25.2.3]# yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel
Kylin Linux Advanced Server 10 - Os 3.7 MB/s | 3.8 kB 00:00
Package make-1:4.3-1.ky10.x86_64 is already installed.
Package gcc-7.3.0-20190804.35.p02.ky10.x86_64 is already installed.
Package gcc-c+±7.3.0-20190804.35.p02.ky10.x86_64 is already installed.
Package kernel-devel-4.19.90-24.4.v2101.ky10.x86_64 is already installed.
Package m4-1.4.18-13.1.ky10.x86_64 is already installed.
Dependencies resolved. =================================================================================================
Package Architecture Version Repository Size
Installing:
ncurses-devel x86_64 6.2-1.ky10 ks10-adv-os 643 k
openssl-devel x86_64 1:1.1.1f-4.p01.ky10 ks10-adv-os 1.7 M
unixODBC-devel x86_64 2.3.7-2.ky10 ks10-adv-os 47 k
Installing dependencies:
e2fsprogs-devel x86_64 1.45.6-1.ky10 ks10-adv-os 280 k
keyutils-libs-devel x86_64 1.6.3-1.ky10 ks10-adv-os 11 k
krb5-devel x86_64 1.18.2-1.ky10 ks10-adv-os 162 k
libverto-devel x86_64 0.3.1-2.ky10 ks10-adv-os 16 k
Transaction Summary
Install 7 Packages
Total size: 2.9 M
Installed size: 14 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libverto-devel-0.3.1-2.ky10.x86_64 1/7
Installing : keyutils-libs-devel-1.6.3-1.ky10.x86_64 2/7
Installing : e2fsprogs-devel-1.45.6-1.ky10.x86_64 3/7
Running scriptlet: e2fsprogs-devel-1.45.6-1.ky10.x86_64 3/7
Installing : krb5-devel-1.18.2-1.ky10.x86_64 4/7
Installing : openssl-devel-1:1.1.1f-4.p01.ky10.x86_64 5/7
Installing : unixODBC-devel-2.3.7-2.ky10.x86_64 6/7
Installing : ncurses-devel-6.2-1.ky10.x86_64 7/7
Running scriptlet: ncurses-devel-6.2-1.ky10.x86_64 7/7
/sbin/ldconfig: /usr/lib64/libLLVM-7.so is not a symbolic link
Verifying : e2fsprogs-devel-1.45.6-1.ky10.x86_64 1/7
Verifying : keyutils-libs-devel-1.6.3-1.ky10.x86_64 2/7
Verifying : krb5-devel-1.18.2-1.ky10.x86_64 3/7
Verifying : libverto-devel-0.3.1-2.ky10.x86_64 4/7
Verifying : ncurses-devel-6.2-1.ky10.x86_64 5/7
Verifying : openssl-devel-1:1.1.1f-4.p01.ky10.x86_64 6/7
Verifying : unixODBC-devel-2.3.7-2.ky10.x86_64 7/7
Installed:
e2fsprogs-devel-1.45.6-1.ky10.x86_64 keyutils-libs-devel-1.6.3-1.ky10.x86_64
krb5-devel-1.18.2-1.ky10.x86_64 libverto-devel-0.3.1-2.ky10.x86_64 ncurses-devel-6.2-1.ky10.x86_64
openssl-devel-1:1.1.1f-4.p01.ky10.x86_64 unixODBC-devel-2.3.7-2.ky10.x86_64
Complete!
[root@kylin101 otp_src_25.2.3]# ./configure --prefix=/opt/erlang25
=== Running configure in /soft/otp_src_25.2.3/erts ===
./configure ‘–prefix=/opt/erlang25’ --disable-option-checking --cache-file=/dev/null --srcdir=“/soft/otp_src_25.2.3/erts”
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking target system type… x86_64-pc-linux-gnu
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether the compiler supports GNU C… yes
checking whether gcc accepts -g… yes
checking for gcc option to enable C11 features… none needed
checking for library containing strerror… none required
checking OTP release… 25
。。。。。
configure: WARNING: No OpenGL headers found, wx will NOT be usable
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
********************** APPLICATIONS INFORMATION *******************
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.
********************** DOCUMENTATION INFORMATION ******************
documentation :
fop is missing.
Using fakefop to generate placeholder PDF files.
[root@kylin101 otp_src_25.2.3]#
[root@kylin101 otp_src_25.2.3]# make
MAKE depend
make[1]: Entering directory ‘/soft/otp_src_25.2.3/erts/emulator’
MAKE generate
make[2]: Entering directory ‘/soft/otp_src_25.2.3/erts/emulator’
GEN x86_64-pc-linux-gnu/opt/jit/OPCODES-GENERATED
GEN x86_64-pc-linux-gnu/opt/jit/beam_asm_global.hpp
GEN x86_64-pc-linux-gnu/opt/jit/TABLES-GENERATED
GEN x86_64-pc-linux-gnu/opt/jit/erl_alloc_types.h
GEN x86_64-pc-linux-gnu/erl_version.h
GEN x86_64-pc-linux-gnu/opt/jit/driver_tab.c
make[3]: Entering directory ‘/soft/otp_src_25.2.3/erts/lib_src’
MAKE opt
make[4]: Entering directory ‘/soft/otp_src_25.2.3/erts/lib_src’
GEN obj/x86_64-pc-linux-gnu/opt/depend.mk
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/simple_c_gc.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/re.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_lexer.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_main.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_node.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_parser.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_printers.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_string.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_symbol.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_utils.o
CC /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/x86_64-pc-linux-gnu/ycf_yield_fun.o
LD /soft/otp_src_25.2.3/erts/lib_src/yielding_c_fun/bin/x86_64-pc-linux-gnu/yielding_c_fun
。。。
=== Leaving application tftp
make[2]: Leaving directory ‘/soft/otp_src_25.2.3/lib/tftp’
make[1]: Leaving directory ‘/soft/otp_src_25.2.3/lib’
make[1]: Entering directory ‘/soft/otp_src_25.2.3/erts’
make[2]: Entering directory ‘/soft/otp_src_25.2.3/erts/start_scripts’
GEN /soft/otp_src_25.2.3/erts/start_scripts/start_clean.rel
GEN /soft/otp_src_25.2.3/erts/start_scripts/start_sasl.rel
GEN /soft/otp_src_25.2.3/erts/start_scripts/start_all_example.rel
GEN /soft/otp_src_25.2.3/erts/start_scripts/no_dot_erlang.rel
GEN /soft/otp_src_25.2.3/erts/start_scripts/start_clean.script
GEN /soft/otp_src_25.2.3/erts/start_scripts/start_sasl.boot
GEN /soft/otp_src_25.2.3/erts/start_scripts/no_dot_erlang.boot
GEN RELEASES.src
make[2]: Leaving directory ‘/soft/otp_src_25.2.3/erts/start_scripts’
make[2]: Entering directory ‘/soft/otp_src_25.2.3/erts/start_scripts’
GEN /soft/otp_src_25.2.3/bin/start.script
GEN /soft/otp_src_25.2.3/bin/start_sasl.script
GEN /soft/otp_src_25.2.3/bin/start_clean.script
GEN /soft/otp_src_25.2.3/bin/no_dot_erlang.script
make[2]: Leaving directory ‘/soft/otp_src_25.2.3/erts/start_scripts’
make[1]: Leaving directory ‘/soft/otp_src_25.2.3/erts’
[root@kylin101 otp_src_25.2.3]#
[root@kylin101 otp_src_25.2.3]# make install
MAKE erl_interface
make[1]: Entering directory ‘/soft/otp_src_25.2.3/lib/erl_interface’
=== Entering application erl_interface
make[2]: Entering directory ‘/soft/otp_src_25.2.3/lib/erl_interface/src’
MAKE opt
make[3]: Entering directory ‘/soft/otp_src_25.2.3/lib/erl_interface/src’
make[3]: Nothing to be done for ‘opt’.
make[3]: Leaving directory ‘/soft/otp_src_25.2.3/lib/erl_interface/src’
make[2]: Leaving directory ‘/soft/otp_src_25.2.3/lib/erl_interface/src’
make[2]: Entering directory ‘/soft/otp_src_25.2.3/lib/erl_interface/doc/src’
make[2]: Nothing to be done for ‘opt’.
make[2]: Leaving directory ‘/soft/otp_src_25.2.3/lib/erl_interface/doc/src’
=== Leaving application erl_interface
make[1]: Leaving directory ‘/soft/otp_src_25.2.3/lib/erl_interface’
MAKE emulator
make[1]: Entering directory ‘/soft/otp_src_25.2.3/erts’
make[2]: Entering directory ‘/soft/otp_src_25.2.3/erts’
make[3]: Entering directory ‘/soft/otp_src_25.2.3/erts/emulator’
。。。
make[3]: Leaving directory ‘/soft/otp_src_25.2.3/lib/tftp’
=== Leaving application tftp
make[2]: Leaving directory ‘/soft/otp_src_25.2.3/lib/tftp’
make[1]: Leaving directory ‘/soft/otp_src_25.2.3/lib’
(cd “/opt/erlang25/lib/erlang”
&& ./Install -minimal “/opt/erlang25/lib/erlang”)
/usr/bin/install -c -m 644 “/soft/otp_src_25.2.3/OTP_VERSION” “/opt/erlang25/lib/erlang/releases/25”
cd /opt/erlang25/bin
rm -f erl
rm -f erlc
rm -f epmd
rm -f run_erl
rm -f to_erl
rm -f dialyzer
rm -f typer
rm -f escript
rm -f ct_run
ln -s …/lib/erlang/bin/erl erl
ln -s …/lib/erlang/bin/erlc erlc
ln -s …/lib/erlang/bin/epmd epmd
ln -s …/lib/erlang/bin/run_erl run_erl
ln -s …/lib/erlang/bin/to_erl to_erl
ln -s …/lib/erlang/bin/dialyzer dialyzer
ln -s …/lib/erlang/bin/typer typer
ln -s …/lib/erlang/bin/escript escript
ln -s …/lib/erlang/bin/ct_run ct_run
[root@kylin101 otp_src_25.2.3]# erl
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns]
Eshell V13.1.5 (abort with ^G)
1> [X || X <- [1,2,3,4,5,6,7,8,9,10], X rem 2 =:= 0].
[2,4,6,8,10]
2>

被折叠的 条评论
为什么被折叠?



