My taxi packages are FUBAR; How can I clean them and get started?

I forgot to enable the creation of libraries for profiling in my ~/.cabal/config , before installing a bunch of packages on a new computer, and now --reinstall world , to try to fix the situation, left everything broken (of course).

I think it's better to use your time to just clear everything. How to do it right?

+62
haskell cabal
Aug 21 '12 at 4:13
source share
2 answers

Cabal doesn't track what it installed, it just uses the ghc library mechanism (or some other compiler if you don't use ghc), so you can use rm -r ~/.ghc to remove all locally installed libraries.

If you have multiple ghc installed and you want to remove only libs for a specific ghc, delete the subdirectory corresponding to any ghc that you want to remove.
For example, I can remove everything that I installed for ghc-7.6.0 using rm -r ~/.ghc/x86_64-linux-7.6.0.20120810
You can also use this to save your ghci_history if you want.

 ll ~/.ghc/ total 24 -rw-r--r-- 1 johnl johnl 2300 Aug 21 11:47 ghci_history drwxr-xr-x 3 johnl johnl 4096 Jun 17 19:09 x86_64-linux-6.12.3 drwxr-xr-x 3 johnl johnl 4096 May 17 08:17 x86_64-linux-7.2.1 drwxr-xr-x 3 johnl johnl 4096 May 16 17:34 x86_64-linux-7.4.1 drwxr-xr-x 3 johnl johnl 4096 Jun 15 08:21 x86_64-linux-7.4.2 drwxrwxr-x 3 johnl johnl 4096 Aug 15 12:37 x86_64-linux-7.6.0.20120810 

Edit: ~/.cabal/world - a list of installed packages with version restrictions specified by the user. Thus, in most cases it will include, for example, mtl -any . If you installed packages with certain versions, for example, by releasing cabal install mtl-2.1.1 , it will record this version. You must be able to either delete the world file, or start over, or if you look at it and the dependencies are acceptable, you can only try running cabal install world . Or you could ignore it, and not use support for bondage support (what I'm doing).

+58
Aug 21 '12 at 4:23
source share

This ghc-pkg- reset shell script clears both ~ / .ghc / and ~ / .cabal / somewhat more selectively. (And the accompanying ghc-pkg-clean script can help restore from a confusing package installation, possibly avoiding reset.) I find them useful.

+18
Aug 29 2018-12-12T00:
source share



All Articles