Haskell 使用沙盒GHC进行健全性检查时堆栈失败
我收到一个非常奇怪的错误,它与新安装的沙盒GHC有关,该GHC是从Haskell 使用沙盒GHC进行健全性检查时堆栈失败,haskell,ghc,gmp,haskell-stack,Haskell,Ghc,Gmp,Haskell Stack,我收到一个非常奇怪的错误,它与新安装的沙盒GHC有关,该GHC是从堆栈设置创建的。 它看起来与/usr/bin/ld 提前谢谢你的帮助!一般来说,我对Linux也是新手 tristan@tristan-System-Product-Name ~ $ stack setup The GHC located at /home/tristan/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc failed to compile a sanity check.
堆栈设置创建的。
它看起来与/usr/bin/ld
提前谢谢你的帮助!一般来说,我对Linux也是新手
tristan@tristan-System-Product-Name ~ $ stack setup
The GHC located at /home/tristan/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc failed to compile a sanity check. Please see
http://docs.haskellstack.org/en/stable/installiandiupgrade/
for more information. Exception was:
Running /home/tristan/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc /tmp/stack-sanity-check10861/Main.hs -no-user-package-db in directory /tmp/stack-sanity-check10861/ exited with ExitFailure 1
[1 of 1] Compiling Main (/tmp/stackrsanityrchecklosfil/Main.hs, /tmp /stackrsanityrcheck10861/Main.0 )
Linking /tmp/stackrsanityrcheck10861/Main
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
tristan@tristan-系统产品名称~$堆栈设置
位于/home/tristan/.stack/programs/x86_64-linux/GHC-8.0.1/bin/GHC的GHC未能编译健全性检查。请看
http://docs.haskellstack.org/en/stable/installiandiupgrade/
了解更多信息。例外情况是:
正在运行/home/tristan/.stack/programs/x86_64-linux/ghc-8.0.1/bin/ghc/tmp/stack-sanity-check10861/Main.hs-目录/tmp/stack-sanity-check10861/中没有用户包数据库/退出失败1
[1/1]编译Main(/tmp/stackrsanityrchecklos fil/Main.hs,/tmp/stackrsanityrcheck10861/Main.0)
链接/tmp/stackrsanityrcheck10861/Main
/usr/bin/ld:找不到-lgmp
collect2:错误:ld返回了1个退出状态
`gcc“”在“链接器”阶段失败。(退出代码:1)你的Linux发行版是什么?尝试安装libgmp3-dev。使用实际文本代替图片。我使用的是LinuxMint最新版本。