[Haskell-cafe] Re: need help for cabal-install

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Jan 19 11:02:17 EST 2008

On Sat, 2008-01-19 at 09:27 -0500, Steve Lihn wrote:
> On Jan 19, 2008 9:18 AM, Duncan Coutts <duncan.coutts at worc.ox.ac.uk> wrote:
> >
> > >
> > > I think you're just missing a "--user":
> > >
> > >    $ cabal install --prefix=$HOME --user foo
> >
> > The prefix can also be set in the $HOME/.cabal/config file.
> >
> Syntax? Something like: prefix: /path/to/my/ghc ?

Yes, but using ghc's path would be a really bad idea.

Actually there's "user-prefix:" and "global-prefix:" for the prefixes to
use when using --user or --global installs.

> > BTW, In the development version of cabal-install --user is the default
> > and the default user prefix is $HOME/.cabal (though both can be changed
> > in the config file).
> >
> Is this newer than 12 hours ago? I tried "cabal install --prefix=/path
> package" (without --user). That did not seem to work...

Remember, --user is default unless overridden by --global. So if you are
trying to install as root that probably will not work since it'll
probably have been built against packages that were in your user's
package db but are not in your root users package db. We've not
concentrated very much on global installs yet for cabal-install. We've
been trying to make ordinary user installs "Just Work"tm.

There was a bug a couple days ago where the prefix given on the command
line was being overridden from the one given in the config file. That's
now fixed. The command line overrides the saved config settings.

So if it's still not working for you, you'll have to give more details.
Details of what command you were using exactly and what the error
message was.


More information about the Haskell-Cafe mailing list