[Haskell-cafe] Libraries in home dir

Alfonso Acosta alfonso.acosta at gmail.com
Thu Oct 9 09:30:43 EDT 2008


On Thu, Oct 9, 2008 at 3:08 PM, Mauricio <briqueabraque at yahoo.com> wrote:
> I want to use a few libraries from hackage
> and have already download and built them. Can
> I install those libraries somewhere in my
> home dir (I want to avoid installing as root)
> so that ghc can find them?

Sure, just write:

runhaskell Setup.hs configure --user
--prefix=personal/directory/where/to/install/the/package

--user tells cabal to install the package in the user package-database

You might want to use cabal-install [1] in order to automatize the
insallation of Cabal packages. By default it uses the --user flag and
copies the package files under $HOME/.cabal/.

Important caveat: Make sure to also supply the --user flag when
compiling other packages which depend on your library. Otherwise Cabal
will only look for it in the global package-dabatase and won¡t be able
to find it.

[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cabal-install


More information about the Haskell-Cafe mailing list