我有一台Ubuntu 14.04LTS的电脑。我从http://www.haskell.org/ghc/download_ghc_7_8_3#x86_64linux下载了最新版本的
ghc-7.8.3
并将其安装到/usr/local
目录下。然后,我升级了我的cabal
到版本1.20.0.3
。接着,在终端中输入cabal install QuickCheck
,结果显示:Resolving dependencies...
Configuring tf-random-0.5...
Building tf-random-0.5...
Preprocessing library tf-random-0.5...
[1 of 4] Compiling System.Random.TF.Gen ( src/System/Random/TF/Gen.hs, dist/build/System/Random/TF/Gen.o )
[2 of 4] Compiling System.Random.TF.Init ( src/System/Random/TF/Init.hs, dist/build/System/Random/TF/Init.o )
src/System/Random/TF/Init.hs:94:5: Warning:
In the use of ‘bitSize’ (imported from Data.Bits):
Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"
[3 of 4] Compiling System.Random.TF.Instances ( src/System/Random/TF/Instances.hs, dist/build/System/Random/TF/Instances.o )
[4 of 4] Compiling System.Random.TF ( src/System/Random/TF.hs, dist/build/System/Random/TF.o )
/usr/bin/ld: cannot find -lHSrandom-1.0.1.1-ghc7.8.3
collect2: error: ld returned 1 exit status
Failed to install tf-random-0.5
cabal: Error: some packages failed to install:
QuickCheck-2.7.5 depends on tf-random-0.5 which failed to install.
tf-random-0.5 failed during the building phase. The exception was:
ExitFailure 1
顺便提一下,我之前已经通过 apt-get
安装了 haskell-platform
和 ghc-7.6.3
.
cabal install foobar -reinstall --force-reinstalls
命令。您可能需要指定特定的版本。 - Buttons840gmp
库时遇到了类似的错误,请参考我的问题,但不幸的是上述解决方法并没有起作用。还有其他建议吗? - The Dude