[erlang-questions] installing to --prefix, but running symlinked somewhere else

Geoff Cant <>
Thu Jan 24 22:43:41 CET 2013

I think the general consensus for deploying erlang systems these days is to bring all your dependencies with your system. Don't share libraries amongst different systems/releases running on the same machine.

Sharing is maybe convenient for stdlib and development environments, but nigh on impossible to live with in production.

Other languages have already moved in this direction - bundler in ruby and virtualenv in python both spring to mind.

System-wide libraries seem on the way out.

Geoff Cant

On 2013-01-24, at 12:48 , Dirk Hörner <> wrote:

> Hi Fred,
> thanks for your reply. I thought about ERL_LIBS, too, but what about port
> drivers/bindings you may want to install globally for every one to use. Is
> that something which is generally not recommended? Should every OTP app
> bring their own dependencies?
> Ciao,
> Dirk
> On Wed, Jan 23, 2013 at 10:56 PM, Fred Hebert <> wrote:
>> I assume that by apps you mean OTP apps you end up installing on your
>> system. There's an ENV variable called ERL_LIBS that can point to one or
>> more directories that contains OTP app directories, and that Erlang can
>> look for when booting up.
>> Dump your apps in there, and either export ERL_LIBS=/your/directory, or
>> run it as $ erl -env ERL_LIBS=/your/directory (works cross-platform) to
>> get your Erlang copy to look wherever. By default it'll pick the newest
>> apps.
>> This is an especially nice feature because it lets you have many
>> different sets of installed applications to work with on a per-release
>> or per-project basis.
>> I hope this helps,
>> Fred.
>> On 01/23, Dirk H�rner wrote:
>>> Hi all,
>>> I am using erlang on Mac OS X and am using homebrew (a package manager,
>>> https://github.com/mxcl/homebrew) to keep my erlang installation
>>> up-to-date. Now homebrew installs all packages into its own directory and
>>> then symlinks the files into the right spot, like this:
>>> Installed to (--prefix): /usr/local/Cellar/erlang/R15B03
>>> Symlinked to and run in: /usr/local
>>> With the default erlang build options, this makes erlang look for its app
>>> under /usr/local/Cellar/erlang/R15B03/lib/erlang/lib. However third party
>>> apps install into /usr/local/lib/erlang/lib, and erlang cannot find them
>>> there.
>>> Currently I am fixing this by crudely changing $ROOTDIR in
>>> .../lib/erlang/bin/erl and .../lib/erlang/bin/start, but I am wondering
>> if
>>> there is a better way to do this? And if there is not, is my hack causing
>>> any side effects I am not seeing yet?
>>> Thanks,
>>> Dirk
>>> _______________________________________________
>>> erlang-questions mailing list
>>> http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list