Erlang Language Installation Build and Install Erlang/OTP on FreeBSD


The following examples show 3 main methods for installing Erlang/OTP on FreeBSD.

Method 1 - Pre-built Binary Package

Use pkg to install the pre-built binary package:

$ pkg install erlang

Test your new installation:

$ erl
Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3.1  (abort with ^G)

Method 2 - Build and install using the port collection (recommended)

Build and install the port as usual:

$ make -C /usr/ports/lang/erlang install clean

Test your new installation:

$ erl
Erlang/OTP 18 [erts-7.3.1] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3.1  (abort with ^G)

This will fetch the release tarball from the official website, apply a few patches if needed, build the release and install it. Obviously, it will take some time.

Method 3 - Build and install from the release tarball

Note: building the release manually works, but using the two above methods should be preferred, since the port collection embeds patches that render the release more FreeBSD friendly.

Download the release file:

$ fetch ''

Check that its MD5 sum is correct:

$ fetch ''
MD5                                           100% of   24 kB  266 kBps 00m00s

$ grep otp_src_18.3.tar.gz MD5
MD5(otp_src_18.3.tar.gz)= 7e4ff32f97c36fb3dab736f8d481830b

$ md5 otp_src_18.3.tar.gz
MD5 (otp_src_18.3.tar.gz) = 7e4ff32f97c36fb3dab736f8d481830b

Extract the tarball:

$ tar xzf otp_src_18.3.tar.gz


$ ./configure --disable-hipe

If you want to build Erlang with HiPe, you will need to apply the patches from the port collection.


$ gmake


$ gmake install

Test your new installation:

$ erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]

Eshell V7.3  (abort with ^G)

Build and install using kerl

kerl is a tool that helps you build and install Erlang/OTP releases.

Install curl:

$ make -C /usr/ports/ftp/curl install clean

Download kerl:

$ fetch ''
$ chmod +x kerl

Update the list of available releases:

$ ./kerl update releases
The available releases are:
R10B-0 R10B-10 R10B-1a R10B-2 R10B-3 R10B-4 R10B-5 R10B-6 R10B-7 R10B-8 R10B-9 R11B-0 R11B-1 R11B-2 R11B-3 R11B-4 R11B-5 R12B-0 R12B-1 R12B-2 R12B-3 R12B-4 R12B-5 R13A R13B01 R13B02-1 R13B02 R13B03 R13B04 R13B R14A R14B01 R14B02 R14B03 R14B04 R14B R14B_erts- R15B01 R15B02 R15B02_with_MSVCR100_installer_fix R15B03-1 R15B03 R15B R16A_RELEASE_CANDIDATE R16B01 R16B02 R16B03-1 R16B03 R16B 17.0-rc1 17.0-rc2 17.0 17.1 17.3 17.4 17.5 18.0 18.1 18.2 18.2.1 18.3 19.0

Build the required release:

$ ./kerl build 18.3 erlang-18.3

Check that the build is present in the build list:

$ ./kerl list builds

Install the build somewhere:

$ ./kerl install erlang-18.3 ./erlang-18.3

Source the activate file if you're running bash or the fish shell. If you're running a cshell, add the build bin directory to the PATH:

$ setenv PATH "/some/where/erlang-18.3/bin/:$PATH"

Test your new installation:

$ which erl

$ erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.3  (abort with ^G)

Other releases

If you want to build another version of Erlang/OTP, look for the other ports in the collection: