0.13.9版本的Erlide对开发环境的要求是:

Works with Eclipse 3.6, Java 1.5 and Erlang R13B, or later (including Eclipse 4.x).

一,  下载安装eclipse3.6 ,java环境为1.6,Erlang为R14B04

二,  A)ubuntu10.04下编译安装erlang: 

首先得卸载系统自带的Erlang和相关程序:

sudo apt-get remove   erlang-ssl   couchdb-bin   erlang-base   erlang-xmerl   erlang-inets   erlang-crypto   erlang-mnesia   erlang-public-key   erlang-syntax-tools   erlang-runtime-tools

安装Erlang编译时依赖的各种库和工具:

sudo apt-get install   m4   fop   xsltproc   unixodbc   libssl-dev   unixodbc-dev   openjdk-6-jdk   freeglut3-dev   libwxgtk2.8-dev   libncurses5-dev   build-essential

配置前:

编译出错时,如果是wx的错误则:

touch lib/wx/SKIP

before the "configure" step.

配置安装路径和参与编译的功能:

sudo ./configure      --enable-hipe   --enable-threads   --enable-smp-support   --enable-kernel-poll

编译,安装:

sudo make 

sudo make install

 

设置path:

sudo gedit /etc/profile

添加 export PATH=:/usr/local/lib/erlang/bin

 

如果你有安装过jdk,则可以添加在之前的path之后,类似于

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin:/usr/local/redis-2.2.12/bin:/usr/local/lib/erlang/bin

中途如果出错了,不要继续使用出错的代码文件夹,删除掉文件夹配置好环境后重新解压一份代码,否则可能因为configure的缓存导致持续失败。

 sudo apt-get -y install tk-dev  安装了这个包,erlang自带的工具才能用

 

B) window下安装erlang,如下:

1.下载erlang  http://www.erlang.org/download.html(如果下载R14B版本可直接点下面的链接:http://www.erlang.org/download/otp_win32_R14B04.exe)。

2.安装下载的exe文件,注意安装的目录中不要存在空格。

3.配置环境变量。在系统变量中建立变量名为“ERL_HOME”,值为erlang的安装目录。

4.在PATH变量中添加“%ERL_HOME%\bin”。

5.启动运行,在控制台输入“erl”,如果出现类似“Eshell V5.8.2 (abort with ^G)”字样,说明安装成功。

三,   在eclipse中安装erlide IDE。

 

按照,插件主页: http://erlide.org/上的说明即可:
 
Install Erlide by going to Help → Install new software... . In the dialog, enter http://erlide.org/update as URL. Follow the dialogs with the obvious choices and in the end you will be asked to restart.

An alternative way to install is from the Eclipse marketplace Help → Eclipse Marketplace... or if you are using Eclipse 3.7 simply by dragging and dropping the button below into a running Eclipse workspace  

Restart. Go to Window → Preferences → Erlang → Installed runtimes and add an entry (or several) for your Erlang installation(s) of choice. The required parameters are the name and the path to the top level directory (i.e. $ERL_TOP). Now restart again.
 
在Eclipse中打开Window → Preferences → Erlang,可以选择当前IDE使用哪个版本的Erlang .见下图:
 

  

自此,顺利配置好了ubuntu10.04的erlang开发环境

四,使用erlide创建第一个Erlang工程

1,新建工程。 
   在菜单上依次选择[File]->[New]->[Project],然后选择[Erlang]->[Erlang Project]。填写Project Name,比如“ElTest”,余下的按默认设置,点击[Next],最后是[Finish]。 

2.新建module 
   在左边新建的project里右键点击[src],选择[new module],在弹出的窗口里填入以下信息。 
   Module name:Test 
   Container:/ElTest/src      (默认) 
   Application name:None   (默认) 
   Skeleton:None   (默认) 
在最下面的两个输入框里输入say(这个是方法名)和0(参数个数),然后点击[Apply]按钮。最后点击[finish]按钮。

3,配置运行project 

  右键点击Project,依次选择[run as]->[run configurations],在弹出的窗口,右键点击左边一览的[Erlang application],选择[new]。 
  在右边的[main]页面,选择要运行的project(这儿默认是ElTest), 
  在[runtimes]页面,依次选择,填入以下 
   runtime:Erl5.6.5 
   NodeName: test 
   Cookie:           默认什么都不填 
   选择[Start the Erlang node if not running already] 
   然后点击[run]按钮 
  
    在下面的Console窗口,输入test:say(). 
   ( 注意后面的那个句点。) 

    你就会看到传说中的hello,world了。

 

在新里锝 包管理器中可以搜索安装yaws等Erlang开源项目

配置环境的过程,出了不少错,花了不少时间。凡事还是要靠自己,传说中的erlang-cn群对新手其实帮助不大,估计是不屑新手的初级问题吧。

 以上内容,整理参考自:

http://weiqingfei.iteye.com/blog/264684 

http://www.cnblogs.com/me-sa/archive/2011/12/28/erlang0026.html

http://blog.csdn.net/ericzhou99/article/details/5952018