Quick Start
1 Getting Set Up
1.1 Dependencies
First and foremost, you will need Erlang installed. On Mac OS X, this is as
easy as executing brew install erlang
or on Ubuntu apt-get install
erlang
. You can also install Erlang from the various pre-built packages
provided on the official Erlang
download page or from the
Erlang
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
1.2 Building
With the dependencies installed, we're now ready to build LFE.
1.2.1 Using make
$ 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
the Makefile
that temporarily requires that first step.
1.2.2 Using rebar
Alternatively, one may use rebar
to build LFE:
$ cd ./lfe
$ rebar compile
1.3 Installing
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
set your $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
Homebrew:
$ 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: