[Haskell-cafe] Re: Completely confused by cabal
Andrea Vezzosi
sanzhiyan at gmail.com
Sun Mar 22 08:00:36 EDT 2009
On Sun, Mar 22, 2009 at 12:51 PM, Colin Paul Adams
<colin at colina.demon.co.uk> wrote:
>>>>>> "Achim" == Achim Schneider <barsoap at web.de> writes:
>
> Achim> Colin Paul Adams <colin at colina.demon.co.uk> wrote:
> >> So why doesn't it find packages then, when they are installed?
> >>
> Achim> I've got no idea, what exactly are you trying to do, and
> Achim> how?
>
> I'm trying to re-compile ghc 6.11 and it doesn't find parsec.
when cabal is invoked by root, like in su -c "cabal ..." or su -c
"runghc Setup ...", it won't see the user packagedb, but there's
rarely a reason to do so.
Usually only the install phase needs to be done as root, while
building and configuring can be done as user.
For ghc you'd want to run ./configure and make as user and make install as root.
For normal packages, if you want to install them system wide, you'd
use something like
cabal install --global --root-cmd=sudo foo
You can make those flags the default with
user-install: False
root-cmd: sudo
in ~/.cabal/config
If you still have problems it'd be interesting to see what are the
initial commands that were failing in your attemt to build ghc-6.11.
More information about the Haskell-Cafe
mailing list