Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Haskell环境软管重新安装后_Macos_Haskell_Ghc_Cabal_Ghc Pkg - Fatal编程技术网

Macos Haskell环境软管重新安装后

Macos Haskell环境软管重新安装后,macos,haskell,ghc,cabal,ghc-pkg,Macos,Haskell,Ghc,Cabal,Ghc Pkg,我最近重新安装了Haskell环境,因为我认为在将MacOSX升级到Mavericks之后,我已经无法恢复了 现在,每次我运行cabal install cabal install时,都会出现以下错误 Resolving dependencies... Configuring cabal-install-1.18.0.3... /var/folders/4l/qbdvy5xj4q53skv0zn0lhw940000gp/T/8247.c:1:12: warning: control

我最近重新安装了Haskell环境,因为我认为在将MacOSX升级到Mavericks之后,我已经无法恢复了

现在,每次我运行cabal install cabal install时,都会出现以下错误

Resolving dependencies...
Configuring cabal-install-1.18.0.3...

/var/folders/4l/qbdvy5xj4q53skv0zn0lhw940000gp/T/8247.c:1:12:
     warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
           ^
1 warning generated.
Building cabal-install-1.18.0.3...
Preprocessing executable 'cabal' for cabal-install-1.18.0.3...

Main.hs:118:8:
    Could not find module `Distribution.Version'
    There are files missing in the `Cabal-1.18.1.3' package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
Failed to install cabal-install-1.18.0.3
cabal: Error: some packages failed to install:
cabal-install-1.18.0.3 failed during the building phase. The exception was:
ExitFailure 1
Abes-MacBook-Pro:artifact abe$ cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.18.0.3...

/var/folders/4l/qbdvy5xj4q53skv0zn0lhw940000gp/T/8335.c:1:12:
     warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
           ^
1 warning generated.
Building cabal-install-1.18.0.3...
Preprocessing executable 'cabal' for cabal-install-1.18.0.3...

Main.hs:118:8:
    Could not find module `Distribution.Version'
    There are files missing in the `Cabal-1.18.1.3' package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
Failed to install cabal-install-1.18.0.3
cabal: Error: some packages failed to install:
cabal-install-1.18.0.3 failed during the building phase. The exception was:
ExitFailure 1
在谷歌搜索之后,我发现:

我运行它来为Haskell包装clang,但是上面的错误仍然发生

运行ghc包装检查


为什么我的Haskell环境如此破败?我该如何解决这个问题呢?

这个问题源于这样一个事实,即阴谋集团可以跟踪同一个软件包的多个版本

运行:

cabal install --reinstall Cabal-1.18.1.3

修复问题

问题源于阴谋集团可以跟踪同一软件包的多个版本

运行:

cabal install --reinstall Cabal-1.18.1.3

修复问题

一种方法是删除本地ghc程序包缓存:

$cd~/.ghc/&rm-rf*/package.conf.d $ghc包装-用户重新注册 在你这样做之后,再次尝试阴谋集团的命令

$cabal安装包名称 这应该行得通。如果没有,请尝试删除您的阴谋集团包,然后重复上述步骤:

$rm-rf~/.阴谋集团 如果您仍有问题,系统ghc软件包缓存可能会引用丢失的软件包。运行以下命令:

$ghc包装-用户重新注册 $sudo ghc包装翻新 $ghc包装-v支票 最后一个命令应该打印系统缓存。在我的GNU/Linux系统上,它打印以下内容:

using cache: /home/sudoman/.ghc/x86_64-linux-7.6.3/package.conf.d/package.cache
using cache: /var/lib/ghc/package.conf.d/package.cache

在这一点上,我没有一个基于经验的解决方案,但是你可能想考虑删除GHC系统包缓存,像上面一样,然后做一个修复;或者重新安装ghc/haskell平台。

一种方法是删除本地ghc软件包缓存:

$cd~/.ghc/&rm-rf*/package.conf.d $ghc包装-用户重新注册 在你这样做之后,再次尝试阴谋集团的命令

$cabal安装包名称 这应该行得通。如果没有,请尝试删除您的阴谋集团包,然后重复上述步骤:

$rm-rf~/.阴谋集团 如果您仍有问题,系统ghc软件包缓存可能会引用丢失的软件包。运行以下命令:

$ghc包装-用户重新注册 $sudo ghc包装翻新 $ghc包装-v支票 最后一个命令应该打印系统缓存。在我的GNU/Linux系统上,它打印以下内容:

using cache: /home/sudoman/.ghc/x86_64-linux-7.6.3/package.conf.d/package.cache
using cache: /var/lib/ghc/package.conf.d/package.cache
在这一点上,我没有一个基于经验的解决方案,但是你可能想考虑删除GHC系统包缓存,像上面一样,然后做一个修复;或重新安装ghc/haskell平台