记住我们有尼克斯式阴谋集团之前的旧时光。当我们进入 cabal 地狱时,我们可以删除 2 个目录
.cabal
并.ghc
重新启动干净的 cabal 环境。
现在我想,在我的一台机器上出了点问题,我的 nix 风格的 v2-cabal 存储库出现故障。
如果我这样做, cabal v2-install --dry-run directory
我会得到:
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: directory (user goal)
[__0] rejecting: directory-1.3.4.0 (constraint from user target requires
==1.3.3.2)
[__0] trying: directory-1.3.3.2
[__1] next goal: ghc (user goal)
[__1] rejecting: ghc-8.6.5, ghc-8.6.4 (constraint from user target requires
==8.6.3)
[__1] rejecting: ghc-8.6.3/installed-8.6... (conflict: directory==1.3.3.2, ghc
=> directory==1.3.3.0/installed-1.3...)
[__1] rejecting: ghc-8.6.1, ghc-8.4.4, ghc-8.4.3, ghc-8.4.1, ghc-8.2.2,
ghc-8.2.1 (constraint from user target requires ==8.6.3)
[__1] fail (backjumping, conflict set: directory, ghc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: directory, ghc
问题出在 GHC-8.6.3 上。
在另一台机器上,这工作正常,因此我认为有问题。
我怎样才能解决这个问题?删除以下目录就够了吗?
- ~/.cabal/store/ghc-8.6.3
- ~/.cabal/lib/x86_64-linux-ghc-8.6.3
- ~/.cabal/share/x86_64-linux-ghc-8.6.3
- ~/.ghc/x86_64-linux-8.6.3
是否有任何其他目录/文件,我必须删除?有没有类似 cabal v2-clean 命令的东西?
我不想删除其他 GHC 版本的已安装包,因此我不想完全删除.cabal
and.ghc
目录。