【问题标题】:error executing `cabal install cabal-install`: /usr/bin/ld: cannot find -lz执行`cabal install cabal-install`时出错:/usr/bin/ld: 找不到-lz
【发布时间】:2014-08-21 13:52:57
【问题描述】:

我试图在带有 ghc 7.8.2 的 Ubuntu 14.04 上安装最新版本的 cabal-install。以下是错误消息和事物的版本:

~/D/ghc-7.8.2> cabal install cabal-install 
...
Linking dist/build/cabal/cabal ...
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
cabal: Error: some packages failed to install:
cabal-install-1.20.0.3 failed during the building phase. The exception was:
ExitFailure 1

~/D/ghc-7.8.2> which ld
/usr/bin/ld
~/D/ghc-7.8.2> ld -v
GNU ld (GNU Binutils for Ubuntu) 2.24
~/D/ghc-7.8.2> ld -lz
ld: cannot find -lz

~/D/ghc-7.8.2> cabal -V
cabal-install version 1.20.0.3

这没什么大不了的,因为我的阴谋集团版本很新……但我想知道如何解决这个问题。我在 Ubuntu 13.10 中没有这个问题。

也许 Ubuntu 14.04 有一个新版本的 ld 不支持 -lz 标志?

【问题讨论】:

    标签: haskell ubuntu cabal-install


    【解决方案1】:

    找到答案:

    sudo apt-get install lib32z1-dev

    我应该在问这个问题之前用谷歌搜索更长的时间。答案是here

    【讨论】:

      猜你喜欢
      • 2011-03-23
      • 1970-01-01
      • 2014-03-15
      • 1970-01-01
      • 1970-01-01
      • 2015-01-22
      • 1970-01-01
      • 1970-01-01
      • 2014-02-16
      相关资源
      最近更新 更多