2

I'm trying to install hake via cabal install.

Firstly - although the lastest package available is 1.3.7, cabal tries to install 1.2

Apart from that:

~ % cabal install hake-1.2
Resolving dependencies...
Configuring hake-1.2...
Building hake-1.2...
Preprocessing library hake-1.2...

Development/Hake.hs:49:8:
    Could not find module `System.Directory.Tools'
    Perhaps you meant System.Directory (from directory-1.1.0.2)
    Use -v to see a list of the files searched for.
Failed to install hake-1.2
cabal: Error: some packages failed to install:
hake-1.2 failed during the building phase. The exception was:
ExitFailure 1

If I try to be more specific - I get other errors

~ % cabal install hake-1.3.7
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: hake-1.3.7
rejecting: base-3.0.3.2, 3.0.3.1 (global constraint requires installed
instance)
rejecting: base-4.5.1.0/installed-81d... (conflict: hake => base<=4.3.1.0)
rejecting: base-4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0,
4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (global constraint
requires installed instance)

I'm stumped.

Update

It seems the author has made the relevant changes to the package in source, at least on GitHub https://github.com/YoshikuniJujo/hake_haskell, but they are not in Hackage yet.

4

3 に答える 3

5

最新バージョンが最近のバージョンの ghc と一緒にインストールされないようにするbaseonの上限があります。hake(古いバージョンの にhakeは上限がありませんが、実際には上限が必要であり、最初に表示されるエラーを説明しています。)

最良の選択肢は、作成者に連絡して、更新版を Hackage にアップロードするよう依頼することです。次善の (そしてより迅速な) オプションは、.cabalファイルを自分で編集することです。

言う

$ cabal unpack hake-1.3.7
$ cd hake-1.3.7

次に を編集し、を含む行をhake.cabal見つけて、代わりに単に言うように変更します。それから言うBuild-Depends:base<=4.3.1.0base

$ cabal install

そのディレクトリに。もちろん、この種の依存関係の変更が常に機能するとは限りませんが、この場合は機能するようです。

于 2013-04-20T16:56:42.470 に答える
2

依存関係を見るbase (≤4.3.1.0)hake-1.3.7、かなり古いバージョンのbaseライブラリが必要です。せいぜい GHC 7.0が必要なようです。Cabal は の要件を満たせないと判断したためbase、インストールを拒否しましたhake

hake-1.2一方、 は の上限要件を指定していませんbase。Cabal は要件を認識していないため、誤って をビルドしようとしhake、コンパイルに失敗します。

于 2013-04-20T16:57:41.947 に答える