Cabal无法确定GHC版本 [英] Cabal can't determine GHC version
问题描述
我目前正在尝试通过以下方式更新Cabal(1.14.0,版本为4.0的cabal安装)
I am currently trying to update Cabal (1.14.0, cabal-install at version 0.14.0) by doing
cabal install cabal-install
但是,这给我一个带有错误的ExitFailure1
However, this gives me an ExitFailure1 with the error
setup: The program ghc version >=6.4 is required but the
version of /usr/bin/ghc could not be determined.
但是我肯定运行的是GHC更大的版本。
But I'm definitely running a version of GHC that is greater than that.
$ /usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.2
重要的是,我使用的是OSX 10.8,并且要通过Mac上的Haskell Platform下载来安装Haskell。
It might be important that I'm on OSX 10.8 and that I installed Haskell through the Haskell Platform download for Mac.
有人对如何解决此问题有建议吗?我尚未找到有关此问题的任何文档。
Does anyone have advice on how to fix or work around this issue? I haven't been able to find any documentation on this problem.
推荐答案
由于您使用的是Mac,为什么不尝试安装出色的自制软件程序包管理器?将 / usr / local / bin
添加到您的PATH中,然后只需 brew install cabal-install
。
Since you're on a Mac, why not try installing the excellent Homebrew package manager? Add /usr/local/bin
to your PATH, and then it's just brew install cabal-install
.
您甚至可以酿造ghc haskell平台
。
要升级软件包列表,请使用 brew upgrade
,然后您可以查看需要使用 brew过时的
更新的内容,并使用酿造更新
。
To upgrade the package list, use brew upgrade
, then you can see what needs updating with brew outdated
and update them with brew update
.
当然,您可以命名各个软件包以进行更新,并指定软件包的版本。 Homebrew将食谱(Ruby脚本)保留在其自己的git存储库中(默认情况下在/ usr / local中)。
Of course, you can name individual packages to update also, and specify versions of packages. Homebrew keeps the "recipes" (Ruby scripts) for package management in its own git repository (by default in /usr/local).
然后您可以继续进行操作首先您真的想做...编写一些代码! (或根据您的情况构建)
Then you can get on with what you really wanted to do in the first place...write some code! (or build, in your case)
这篇关于Cabal无法确定GHC版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!