
Am Freitag 29 Januar 2010 14:35:22 schrieb Kwanghoon Choi:
Dear All,
After I installed the ghc binary package (ghc-6.12.1-i386-unknown-linux.tar.bz2) manually, I can't find a way to uninstall it. Could anyone help me out?
It will probably be better to uninstall the 6.8.2. There are less antiquated GHCs in some repositories for debian based systems, you can get at least 6.10.* from those. But if you really want to get rid of 6.12, I think you'll have to delete it manually. The most important thing is to not have the ghc, ghc-pkg, runghc and runhaskell scripts [perhaps some are binaries] in you /usr/local/bin [I suppose that's before /usr/bin in your path, hence that's picked up by runhaskell]. Rename them before deleting them to check whether things still work. However, there's no need to get rid of either. Just learn how to use cabal- install.
Thanks in advance.
Kwanghoon
PS. I have installed two versions of ghc. One is with the ghc-6.12.1 package, and the other is ghc-6.8.2 package. The former is downloaded to be installed manually, but the latter is done automatically by using APT tool. They are installed in a different way. I mean the ghc-6.12.1 is under /usr/local/bin, but ghc-6.8.2 is under /usr/bin. (Of course, you can change this default setting though)
apt may not be the best method to deal with Haskell stuff. With cabal- install, you can get up-to-date versions of the packages on hackage.
My original purpose is to install the newest QuickCheck package. Having both ghc packages seems to cause a conflict. After I try with $ runhaskell Setup.lhs configure,
Right. "which runhaskell" will probably say /usr/local/bin/runhaskell, and $ runhaskell --version runghc 6.12.1 ?
I met a dependency error requiring me to install mtl (monad transformer library).
That is no longer included in the ghc packages.
I did install by APT tool.
That unfortunately only knows about the 6.8.2 it installed itself, so it installs mtl for 6.8.2 (which, IIRC, is completely superfluous as mtl was still included then).
But the retrial with $ runhaskell Setup.lhs configure does not work because the configuration is being done by ghc-6.12.1 package.
You could try runhaskell ./Setup.lhs configure --with-compiler=/usr/bin/ghc That would install the package for 6.8.2, if it works (which it probably won't because the newest QuickCheck's cabal file won't be understood by the old Cabal that came with 6.8.2).
The ghc-6.12.1 package doesn't recognize the presence of mtl package that I installed just before. Only the ghc-6.8.2 package seems to recognize the presence of mtl package. The mtl package seems to be built aligned with ghc-6.8.2 package.
Haskell packages are built for and registered with one compiler (version) at the time. So 6.8.2 will know nothing about packages you register with 6.12.1 and vice versa.
I guess this strange phenomena comes from the different configuration of the two versions.
This is the reason why I try to uninstall ghc-6.12.1, but it doesn't seem to provide any way to be uninstalled, unfortunately. If I am wrong, please correct me.
I suggest: download http://hackage.haskell.org/package/cabal-install (version 0.8, to be sure) unpack it cd cabal-install-0.8 ./bootstrap.sh If you get "The 'cabal' program has been installed in ...", all went well and you have a working cabal-install which you can use to get the latest greatest haskell packages (after reading the rest of bootstrap.sh's output and acting accordingly). Then a simple $ cabal install quickcheck will download the latest quickcheck package and its dependencies, and build them and register them with your great 6.12.1. If you get "Sorry, something went wrong." ask again here or in the haskell-cafe.