1 Getting Set Up
First and foremost, you will need Erlang installed. On Mac OS X, this is as
easy as executing
brew install erlang or on Ubuntu
erlang. You can also install Erlang from the various pre-built packages
provided on the official Erlang
download page or from the
Solutions page (supports many more package types).
If you will be using
rebar to build LFE, you'll need to
get that too.
You will need to download git or install it using your favorite package manager.
Next, you will need to download LFE itself:
$ git clone git://github.com/rvirding/lfe.git
With the dependencies installed, we're now ready to build LFE.
$ cd ./lfe $ erlc -o src src/lfe_scan.xrl $ make
Ordinarily, only the
make command would be necessary. However, there's
currently an issue with
Makefile that temporarily requires that first step.
Alternatively, one may use
rebar to build LFE:
$ cd ./lfe $ rebar compile
On non-development systems, or any system where you don't want to run LFE from
a git checkout, installing system-wide is the preferred way to use LFE. If you
$ERL_LIBS environment variable, LFE will install there. Here's
how one might do this on a Mac OS X system with Erlang installed by
$ export ERL_LIBS=/usr/local/lib/erlang/lib $ make install
You can then check that everything is where you expect:
$ ls -1 $ERL_LIBS|grep lfe lfe-0.7
Now you can use LFE from anywhere:
$ erl Erlang R15B03 (erts-220.127.116.11) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] Eshell V18.104.22.168 (abort with ^G) 1> lfe_shell:start(). LFE Shell V22.214.171.124 (abort with ^G) <0.33.0> >