erlang随机数

今天测试阿里云的BGP服务器,部署应用后运行,发现AI老是会自己跑路。难道是搬新家水土不服??

 

检查LOG发现错误:

** Reason for termination =
** {'module could not be loaded',
[{crypto,rand_uniform,[1000,5000],[]},

 

原来是无法加载crypto模块!进一步验证,在erlang shell 中执行:

 l(crypto).

{error,nofile}

找不到模块文件,难怪无法加载。正常应该返回:

{module,crypto}

 

这是为什么涅?经过一番抓头皮之后,难道是编译安装的时候没有安装上?

找到erlang源码,我们用的是16B,执行 ./configure --prefix=/usr/local/erlang

果然,发现问题了,看来关键时候抓头皮还是灰常给力滴!!

 

*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************

crypto : No usable OpenSSL found
jinterface : No Java compiler found
odbc : ODBC library - link check failed
ssh : No usable OpenSSL found
ssl : No usable OpenSSL found

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

 

PS:

1、crypto用到了OpenSSL加密算法

2、我们用不上java编译,因此可以在configure时增加 –disable-javac 避免第二个错误;

 

安装openssl,搞定

yum install openssl-devel

 

posted @ 2013-12-06 14:03  hongmao  阅读(595)  评论(0)    收藏  举报