cabal报告" / usr / bin / ld:找不到-lHSrandom-1.0.1.1-ghc7.8.3"

时间:2014-07-19 09:14:06

标签: haskell ld cabal

我有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

顺便说一句,我之前已通过haskell-platform安装了ghc-7.6.3 apt-get

1 个答案:

答案 0 :(得分:12)

我记得在设置ghc-7.8时有类似的问题。它与新的cabal有关,它与安装了旧版本的库不兼容(但它没有给出正确的问题原因。

无论如何,我认为重新安装有问题的软件包

cabal install random --reinstall --force-reinstalls 

设置它,以便cabal install tf-random成功。