First, make sure you have Erlang installed, following the instructions on the Erlang installation page as appropriate.

Homebrew for Mac OS X

Update your Homebrew to latest:

1
$ brew update

Install LFE:

1
$ brew install lfe

Using a docker container

If you just want to quickly take a look at LFE without polluting your system with new packages, you can just pull a docker container with LFE preinstalled.

Let's fetch a Debian image with LFE:

1
2
$ docker pull lfex/debian  # it will take a while...
[...]

Now let's run the LFE REPL inside the container:

1
2
3
4
$ docker run -i -t lfex/debian lfe
Erlang/OTP 19 [ert[...]

lfe >

And let's write some LFE to test it:

1
2
3
4
5
lfe > (* 7 4)
28
lfe > (lfe_io:format "hello world~n" ())
hello world
ok

Nice! Use (exit) or Ctrl-C (C-c) twice to exit.

Installing from Source

Install your system's "developer tools" or "essential build packages", git and Erlang's erl.

For example, on Ubuntu 14.04:

1
2
3
4
5
6
7
8
9
10
$ sudo apt-get install build-essentials git erlang erlang-base-hipe
```.

Afterwards you can download and build LFE with the following:

```bash
$ git clone https://github.com/rvirding/lfe
$ cd lfe
$ make
$ make install

Once you have LFE compiled, you can start up the REPL (interactive session) by executing the lfe binary:

1
$ ./bin/lfe

Help us explain this better! File a GitHub issue at https://github.com/exercism/lfe/issues if you have suggestions, or submit a patch with improvements to the https://github.com/exercism/lfe/blob/master/docs/INSTALLATION.md file.