1

I installed Erlang on amazon ec2 - on FreeBSD 10 with

fetch http://www.erlang.org/download/otp_src_17.0.tar.gz
gunzip -c otp_src_17.0.tar.gz | tar xf -
cd otp_src_17.0
./configure --disable-hipe
gmake
gmake install

and I get this error:

configure: error: Perl is required to generate v2 to v1 mib converter script
configure: error: /bin/sh '/usr/home/ec2-user/otp_src_17.0/lib/snmp/./configure' failed for snmp/.
configure: error: /bin/sh '/usr/home/ec2-user/otp_src_17.0/lib/configure' failed for lib

How can I install Erlang on FreeBSD 10?

xhienne
  • 17,075
  • 2
  • 52
  • 68
soft-developer
  • 71
  • 1
  • 1
  • 3

1 Answers1

3

FreeBSD comes with a large collection of software that was already ported to FreeBSD. To find out if a software was already ported to FreeBSD you can go to freshports.org and use the search page.

Using Packages

Since FreeBSD 10 there is the new package manager pkgng, which brings a lot of new features to FreeBSD. For example to search for a port.

$ pkg search -o erlang
lang/erlang
databases/erlang-mysql
lang/erlang-runtime15
lang/erlang-runtime16
net/erlang_xmlrpc

So we see that Erlang was already ported to FreeBSD and we could just install it with

pkg install lang/erlang

Using Ports

Alternatively there is the ports tree under /usr/ports where you can automatically receive the source code of a port and compile and install it.

The ports tree is not always installed since it can take a little bit of space. So if /usr/ports is empty you first need to install the ports tree.

# portsnap fetch
# portsnap extract

Inside the ports tree you can search with

#cd /usr/ports/
#make quicksearch name="erlang"
...
Port:   erlang-16.b.03.1,3
Path:   /usr/ports/lang/erlang
Info:   A functional programming language from Ericsson
...

or install software by using the path from the search

#cd /usr/ports/lang/erlang/
#make install clean

Using ports to install and update programs is a little bit harder than using the pkgng and now a beginner should use pkgng over ports.

Both pkgng and ports take care of all the dependencies a package or port need, so if you install Erlang it will also install OpenSSL and Perl and you don't need to do anything else. The ports also install software which is needed to build it. For Erlang this adds Gnu make to the list.

You should read the chapter 5 of the FreeBSD Handbook it explains a lot more about ports and packages and is well written and available in multiple languages.

Raphael Ahrens
  • 9,701
  • 5
  • 37
  • 52
  • 2
    This is sound advice. Wherever possible software should *not* be compiled and installed from a tarball, no matter the OS! – mjturner May 08 '14 at 07:54