
On Friday 16 September 2011, 13:55:25, mukesh tiwari wrote:
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>
That depends on what you have in the global db, but it's a good rule of thumb.
otherwise it will hide the global package. I should only install those packages which are not in global namespace. Am i correct ?
The dependencies are checked by cabal, $ cabal install foo --dry-run should produce something like In order, the following would be installed (use -v for more details): bar-0.3.0.0 baz-1.0.5 foo-2.4.1 If any of the packages listed to be installed are already present, you *may* have a problem. If you already have the exact version of one of them, that's certainly a problem (cabal wouldn't want to reinstall the same version unless something's broken). If cabal wants to install a newer (or older) version of a package ghc itself depends on, that'll almost certainly break some things. If you don't change the global package db after the ghc-install, appearance in the global db is a simple criterion (though not perfect, installing a newer Cabal can be safe, and multiple versions of the same package in the user-db can also break things). In any case, cabal wanting to install a package you already have (and be it a different version) is cause for concern, one should check whether it looks reasonable. [The most common reason for cabal wanting to install a newer version of a present package is that some package you want to install depends on a newer version than you have. That's not a problem per se, but using two packages depending on different versions of the same package together usually doesn't work, so it might be good to recompile some of your packages against the newer version.]
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 -v cabal: The program ghc version >=6.4 is required but it could not be found
Looks bad. The only idea I have is that it could be a PATH issue, your global db for 6.12.3 was under /var/lib, and your 7.2.1 lives under /usr/local, but it doesn't seem likely. However, does $ cabal install --with-compiler=/usr/local/bin/ghc-7.2.1 -v keys --dry-run work?
ntro@ntro-HP-dx2480-MT-NA121PA:~/Mukesh/Haskell$ which ghc-7.2.1 /usr/local/bin/ghc-7.2.1
Does there exist an unversioned ghc? What does $ which ghc print?