手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 11.10 搭建Erlang环境

[日期:2012-04-07] 来源:Linux社区  作者:lqg1122 [字体:大 中 小]

搜索了很多资料都说到,如果库不全的话,编译安装的时候会报各种错误,所以我们站在巨人的肩膀上。

首先,打好库:

  1. sudo apt-get install build-essential    
  2. sudo apt-get install libncurses5-dev     
  3. sudo apt-get install libssl-dev  
  4. sudo apt-get install m4   
  5. sudo apt-get install unixodbc unixodbc-dev  
  6. sudo apt-get install freeglut3-dev libwxgtk2.8-dev    
  7. sudo apt-get install xsltproc    
  8. sudo apt-get install fop   
  9. sudo apt-get install tk8.5   
安装好上面到依赖之后,到官网下个源码包:http://www.erlang.org/download.html

对下到的包进行解压并编译安装:

  1. tar zxvf /home/lqg/下载/otp_src_R15B01.tar.gz  
  2. cd /home/lqg/otp_src_R15B01/  
  3. ./configure  
  4. make && make install  

这里编译一般不会出什么错误,可能会有的是jdk环境的问题:No Java compiler found
这是你检查下jdk 的环境就好了。

最后,在终端输入 erl

可以进行erlang的shell测试了:

  1. 1> io:format("hello wlord").  
  2. hello wlordok  
  3. 2> io:format("hello wlord ~n").  
  4. hello wlord   
  5. ok  
  6. 3> io:format("the output is: ~w ~w~n",[hello,world]).  
  7. the output is: hello world  
  8. ok  
  9. 4> io:format("the output is: ~w~w~n",[hello,world]).   
  10. the output is: helloworld  
  11. ok  
  12. 5> io:format("the output is: ~w~w~n",[hello,world]).  
  13. the output is: helloworld  
  14. ok 

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

更多关于Erlang的详细信息,或者下载地址请点这里

linux
相关资讯       Erlang 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款