
Thank you for reply Daniel . I installed the ghc-7.2.1 but now running cabal install keys --dry-run -v gives error. One more thing i would like to know. Before installing any package , i should check its dependency and if it depends on any global namespace package [/usr/local/lib/ghc-7.2.1/package .conf.d ] so i should not install the global namespace package using cabal install <global-package> otherwise it will hide the global package. I should only install those packages which are not in global namespace. Am i correct ? Any idea how to remove this error . ntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ ghcghc-7.2.1 ghci-7.2.1 ghc-pkg-7.2.1 ntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ cabal install keys --dry-run -vcabal: The program ghc version >=6.4 is required but it could not be foundntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ cabal --vcabal-install version 0.10.2using version 1.10.2.0 of the Cabal libraryntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ ghc-pkg-7.2.1 list/usr/local/lib/ghc-7.2.1/package.conf.d Cabal-1.12.0 array-0.3.0.3 base-4.4.0.0 bin-package-db-0.0.0.0 binary-0.5.0.2 bytestring-0.9.2.0 containers-0.4.1.0 directory-1.1.0.1 extensible-exceptions-0.1.1.3 ffi-1.0 filepath-1.2.0.1 ghc-7.2.1 ghc-prim-0.2.0.0 haskell2010-1.1.0.0 haskell98-2.0.0.0 hoopl-3.8.7.1 hpc-0.5.1.0 integer-gmp-0.3.0.0 old-locale-1.0.0.3 old-time-1.0.0.7 pretty-1.1.0.0 process-1.1.0.0 rts-1.0 template-haskell-2.6.0.0 time-1.2.0.5 unix-2.5.0.0/home/ntro/.ghc/i386-linux-7.2.1/package.conf.d mtl-2.0.1.0 parsec-3.1.1 transformers-0.2.2.0ntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ which ghc-7.2.1/usr/local/bin/ghc-7.2.1ntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ echo $PATH/home/ntro/.cabal/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ which cabal/home/ntro/.cabal/bin/cabal On Fri, Sep 16, 2011 at 4:18 AM, Daniel Fischer < daniel.is.fischer@googlemail.com> wrote:
On Thursday 15 September 2011, 21:37:29, mukesh tiwari wrote:
I tried to resolve this issue on #haskell and i got suggestion that it was due to conflict in
global and local namespace [ see here for more detail http://hpaste.org/51376 ].
Yes.The containers in the global db is shadowed by the user containers.
One idea is i should wipe ~/.ghc and install all the libraries individually.
That'll work. If there are only few packages broken, unregistering only those could be less work.
$ ghc-pkg check
should indicate whether there's a chance that surgical removal of individual packages might be worthwhile. If the breakage is recent and only few packages are affected, it is, otherwise wiping out the entire user db would likely be simpler.
Could some one please suggest if there is another idea to resolve this issue.
There is no fundamentally different way, the only method to fix broken packages is to remove them. The only question is whether it's better to get completely rid of the entire user db [and if you have the bad luck of having breakage within the global db by doing global installs, you'd probably need an entire new ghc installation] or only of individual packages.
Currently i have ghc-6.12.3 and installing ghc-7.0 will resolve the issue ?
In a certain sense, yes. With a new version of ghc, you start with a clean slate without broken packages. However, you could pretty much introduce the same kind of breakage with that.
Generally, it's a bad idea to reinstall any library that came with the ghc installation (there are some exceptions, e.g. installing a newer version of Cabal has a fair chance of not causing havoc). As rules of thumb, - don't mess with the global db, user installs only - don't install any library which already has a version in the global db[*] - be careful when upgrading any library, it could break everything depending on that.
Of course, if you know what you're doing, there can be good reasons to break any of these rules, but if you don't know why it's right, it's probably wrong. Although it's tedious, checking all cabal install with a --dry-run first helps avoiding breakage.
[*] and if you do, the more packages you have installed, the more likely it will break some of those.