我的阴谋集团包是 FUBAR;我怎样才能清除它们并重新开始? [英] My cabal packages are FUBAR; how can I purge them and start over?

查看:16
本文介绍了我的阴谋集团包是 FUBAR;我怎样才能清除它们并重新开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新机器上安装一堆软件包之前,我忘记在我的 ~/.cabal/config 中启用构建库以进行分析,现在是 --reinstall world试图解决这种情况已经让一切都坏了(自然).

I forgot to enable building libs for profiling in my ~/.cabal/config before installing a bunch of packages on a new machine and now a --reinstall world to try to fix the situation has left everything broken (naturally).

我认为最好利用我的时间来清除所有东西.我该如何正确地做到这一点?

I think it's a better use of my time to just purge everything. How do I do that correctly?

推荐答案

Cabal 不跟踪它安装的内容,它只是使用 ghc 的库机制(如果您不使用 ghc,则使用其他编译器的机制),所以你可以使用 rm -r ~/.ghc 删除所有本地安装的库.

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

如果您安装了多个 ghc,并且只想删除特定 ghc 的库,请删除与要删除的任何 ghc 对应的子目录.
例如,我可以使用 rm -r ~/.ghc/x86_64-linux-7.6.0.20120810
删除我为 ghc-7.6.0 安装的所有内容如果您愿意,您也可以使用它来保存您的 ghci_history.

If you have multiple ghc's installed, and you only want to remove the libs for a specific ghc, delete the subdirectory corresponding to whichever ghc you want to remove.
For example, I could remove everything I've installed for ghc-7.6.0 with rm -r ~/.ghc/x86_64-linux-7.6.0.20120810
You can also use this to preserve your ghci_history if you like.

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

~/.cabal/world 是一个已安装包的列表,其中包含用户指定的版本限制.所以在大多数情况下,它会包括例如mtl -any.如果您安装了特定版本的软件包,例如通过发出 cabal install mtl-2.1.1,它会记录该版本.您应该能够删除 world 文件并重新开始,或者如果您查看它并且依赖项是可以接受的,您可以尝试运行 cabal install world.或者你可以忽略它而不使用阴谋集团的世界支持(这就是我所做的).

~/.cabal/world is a list of installed packages with version constraints as specified by the user. So in most cases, it would include e.g. mtl -any. If you've installed packages with specific versions, such as by issuing cabal install mtl-2.1.1, it will record that version. You should be able to either delete the world file and start over, or if you look it over and the dependencies are acceptable, you could try just running cabal install world. Or you could ignore it and not use cabal's world support (that's what I do).

这篇关于我的阴谋集团包是 FUBAR;我怎样才能清除它们并重新开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆