本文介绍了cabal报告“/ usr / bin / ld:找不到-lHSrandom-1.0.1.1-ghc7.8.3”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Ubuntu 14.04LTS。我从并将其安装到 / usr / local



然后我将 cabal 更新为版本 1.20.0.3



我在终端输入 cabal安装QuickCheck ,得到:

 解决依赖关系... 
配置tf-random-0.5 ...
构建tf-random-0.5 ...
预处理库tf-random-0.5 ...
[编译System.Random.TF.Gen(src / System / Random / TF / Gen.hs,dist / build / System / Random / TF / Gen.o)
[4之2]编译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:警告:
使用'bitSize'(从Data.Bits导入):
不推荐使用:使用'bitSizeMaybe'或'finiteBitSize'代替
[3编译System.Random.TF.Instances(src / System / Random / TF / Instances.hs,dist / build / System / Random / TF / Instances.o)
编译系统。 Random.TF(src / System / Random / TF.hs,dist / build / System / Random / TF.o)
/ usr / bin / ld:找不到-lHSrandom-1.0.1.1-ghc7.8.3
collect2:错误:ld返回1退出状态
未能安装tf-random-0.5
cabal:错误:某些软件包未能安装:
QuickCheck-2.7.5取决于tf -random-0.5无法安装。
tf-random-0.5在构建阶段失败。例外情况是:
ExitFailure 1

顺便提一下,我已经有 haskell-platform with ghc-7.6.3 通过 apt-get 安装。 / p>

解决方案

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

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

  cabal install random --reinstall --force-reinstalls 

设置为 cabal install tf-random 应该会成功。


I have Ubuntu 14.04LTS. I downloaded the latest ghc-7.8.3 from http://www.haskell.org/ghc/download_ghc_7_8_3#x86_64linux and installed it to /usr/local.

Then I updated my cabal to version 1.20.0.3.

I typed cabal install QuickCheck into my terminal, and got:

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

BTW, I already have haskell-platform with ghc-7.6.3 installed via apt-get before.

解决方案

I remember having a similar issue when setting up ghc-7.8. It has something to do with the new cabal, which somehow isn't compatible with libraries installed with an older versio (but it fails to give the correct problem reason.

Anyway, I think reinstalling the packages in question

cabal install random --reinstall --force-reinstalls 

sets it up so cabal install tf-random should then succeed.

这篇关于cabal报告“/ usr / bin / ld:找不到-lHSrandom-1.0.1.1-ghc7.8.3”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 07:02