- # tar zvxf otp_src_17.0.tar.gz
- # mv otp_src_17.0/ otp
- # cd otp
- # ./configure --prefix=/home/erlang --without-javac
报错:
configure: error: No curses library functions found
configure: error: /bin/sh '/root/otp/erts/configure' failed for erts
- # yum -y install ncurses-devel
- # ./configure --prefix=/home/erlang --without-javac
报错
*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************
crypto : No usable OpenSSL found
jinterface : Java compiler disabled by user
odbc : ODBC library - link check failed
orber : No C++ compiler found
ssh : No usable OpenSSL found
ssl : No usable OpenSSL found
*********************************************************************
- # yum list | grep ssl
- # yum install openssl-devel
- # ./configure --prefix=/home/erlang --without-javac
报错
*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************
jinterface : Java compiler disabled by user
odbc : ODBC library - link check failed
orber : No C++ compiler found
*********************************************************************
- # yum list | grep ODBC
- # yum install unixODBC-devel
- # ./configure --prefix=/home/erlang --without-javac
报错
*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************
jinterface : Java compiler disabled by user
orber : No C++ compiler found
*********************************************************************
- # yum install gcc-c++
- # ./configure --prefix=/home/erlang --without-javac
- # make
- # make install
安装完成!
测试Erlang是否安装正确
- # /home/erlang/bin/erl
- Erlang/OTP 17 [erts-6.0] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
- Eshell V6.0 (abort with ^G)
- 1> EvenN = lists:filter (fun (N) -> N rem 2 == 0 end, lists:seq(1,100)).
- [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,
- 44,46,48,50,52,54,56,58|...]
- 2> halt().
在PATH环境变量添加Erlang的bin路径,以便执行。
【安装总结】
从源码编译安装Erlang,有两个库或工具是必须的:
一是完整的GCC编译器环境二是Ncurses开发库
还有一些库或工具,如果没有它们,在编译配置时会出现警告信息,而且可能不能通过配置。这些库有:
1)OpenSSL开发库
2)ODBC开发库3)Java编译器