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

Fred Hebert <>
Wed Jan 23 22:56:53 CET 2013


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




More information about the erlang-questions mailing list