【发布时间】:2015-01-28 17:16:26
【问题描述】:
我在尝试安装 Cabal-1.20.0.2 时收到此错误:
$ cabal install Cabal-1.20.0.2.tar.gz
Resolving dependencies...
Configuring Cabal-1.20.0.2...
Failed to install Cabal-1.20.0.2
Last 10 lines of the build log ( /home/yonutix/.cabal/logs/Cabal-1.20.0.2.log ):
cabal: Error: some packages failed to install:
Cabal-1.20.0.2 failed during the configure step. The exception was:
user error (
/tmp/Cabal-1.20.0.2-11804/Cabal-1.20.0.2/Distribution/Simple/Utils.hs:386:31:
Warning:
In the use of ‘runGenProcess_’
(imported from System.Process.Internals):
Deprecated: "Please do not use this anymore, use the ordinary
'System.Process.createProcess'. If you need the SIGINT handling, use
delegate_ctlc = True (runGenProcess_ is now just an imperfectly emulated stub
that probably duplicates or overrides your own signal handling)."
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
)
我需要安装这个包,因为 cabal-install 依赖它。
可能是什么问题? 谢谢!
【问题讨论】:
-
这里有一个线索:
/usr/bin/ld: cannot find -lgmp- ghc 找不到 libgmp。您使用的是什么操作系统?你是如何安装 ghc 的?你在使用 Haskell 平台吗? -
我使用的是全新安装的 Ubuntu 14.04,Haskell Platform 2014.2.0.0 for Linux,64bit $ /usr/bin/ld /usr/bin/ld: 没有输入文件
-
你可以试试这个:
sudo apt-get install libgmp-dev- 如果一个普通的 Ubuntu dist 默认不包含 libgmp,我不会感到惊讶。 -
它成功了,谢谢,将它作为答案发布,现在我在构建步骤“/usr/bin/ld: cannot find -lz”时遇到问题
-
我已经很久没用过Ubuntu了,但如果我冒险猜测,我认为你需要安装
zlib1g-dev(最重要的是你需要zlib开发库)。