如何在 Ubuntu 16.04 上更新 Cabal for Haskell IDE(Leksah)?

如何在 Ubuntu 16.04 上更新 Cabal for Haskell IDE(Leksah)?

我想安装 Leksah,这样我就可以学习如何用 Haskell 编写代码。所以我安装了最新版本的 ghc(我希望安装正确)。但是我缺少 Leksah 的 Cabal 最新版本。我似乎无法安装它。我有 1.24 版本,而最新版本是 1.24。在进行以下步骤之前,我已经更新了 Cabal,并下载了 1.24 版本。我仍然收到以下响应。当我尝试通过键入以下内容在终端中安装时:

cabal install cabal cabal-install

我收到以下回复:

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: cabal-0.0.0.0 (user goal)
next goal: youProbablyWantCapitalCabal (dependency of cabal-0.0.0.0)
Dependency tree exhaustively searched.

当我输入以下内容时:

cabal install foo

我收到以下回复:

Resolving dependencies...
cabal: Could not resolve dependencies:
trying: foo-1.0 (user goal)
trying: base-4.8.2.0/installed-0d6... (dependency of foo-1.0)
trying: containers-0.5.6.2/installed-593... (dependency of foo-1.0)
next goal: haskell98 (dependency of foo-1.0)
rejecting: haskell98-2.0.0.3 (conflict: base==4.8.2.0/installed-0d6...,
haskell98 => base>=4.7 && <4.8)
rejecting: haskell98-2.0.0.2 (conflict: base==4.8.2.0/installed-0d6...,
haskell98 => base==4.6.*)
rejecting: haskell98-2.0.0.1 (conflict: containers =>
array==0.5.1.0/installed-960..., haskell98 => array>=0.3 && <0.5)
rejecting: haskell98-2.0.0.0 (conflict: containers =>
array==0.5.1.0/installed-960..., haskell98 => array>=0.3 && <0.4)
rejecting: haskell98-1.1.0.1, 1.1.0.0, 1.0.1.1 (conflict:
base==4.8.2.0/installed-0d6..., haskell98 => base>=3 && <4.6)
rejecting: haskell98-1.0.1.0 (conflict: base==4.8.2.0/installed-0d6...,
haskell98 => base<4.6)
rejecting: haskell98-1.0 (conflict: base==4.8.2.0/installed-0d6..., 
haskell98
=> base<4.3)
Dependency tree exhaustively searched.

我甚至下载了 cabal 1.24。终端告诉我,我目前安装的是 1.22.6 版,并且我正在使用 Cabal 库的 1.22.5 版。

我该如何更新 Cabal?我是否应该尝试安装 Leksah 而不更新 Cabal?

答案1

在那个略显神秘的错误信息中有一个线索,它说:next goal: youProbablyWantCapitalCabal (dependency of cabal-0.0.0.0)

库包称为Cabalcabal.尝试运行:cabal install Cabal cabal-install

相关内容