`gcc'在阶段`Linker'失败,无法构建'提示'包

时间:2018-02-18 19:46:20

标签: haskell dependency-management haskell-stack

因此,我的package.yaml包含- hint个包。

然后我尝试stack build我的项目。 经度:

Configuring hint-0.7.0...
Preprocessing library for hint-0.7.0..
Building library for hint-0.7.0..
[ 1 of 18] Compiling Control.Monad.Ghc ( src/Control/Monad/Ghc.hs, .stack-wor$
[ 2 of 18] Compiling Hint.CompatPlatform ( src/Hint/CompatPlatform.hs, .stack$
[ 3 of 18] Compiling Hint.GHC         ( src/Hint/GHC.hs, .stack-work/dist/x86$
[ 4 of 18] Compiling Hint.Extension   ( src/Hint/Extension.hs, .stack-work/di$
[ 5 of 18] Compiling Hint.Base        ( src/Hint/Base.hs, .stack-work/dist/x8$
[ 6 of 18] Compiling Hint.Conversions ( src/Hint/Conversions.hs, .stack-work/$
[ 7 of 18] Compiling Hint.Annotations ( src/Hint/Annotations.hs, .stack-work/$
[ 8 of 18] Compiling Hint.Parsers     ( src/Hint/Parsers.hs, .stack-work/dist$
[ 9 of 18] Compiling Hint.Reflection  ( src/Hint/Reflection.hs, .stack-work/d$
[10 of 18] Compiling Hint.Typecheck   ( src/Hint/Typecheck.hs, .stack-work/di$
[11 of 18] Compiling Hint.Util        ( src/Hint/Util.hs, .stack-work/dist/x8$
[12 of 18] Compiling Hint.Context     ( src/Hint/Context.hs, .stack-work/dist$
[13 of 18] Compiling Hint.Eval        ( src/Hint/Eval.hs, .stack-work/dist/x8$
[14 of 18] Compiling Hint.Configuration ( src/Hint/Configuration.hs, .stack-w$
[15 of 18] Compiling Hint.InterpreterT ( src/Hint/InterpreterT.hs, .stack-wor$
[16 of 18] Compiling Language.Haskell.Interpreter ( src/Language/Haskell/Inte$
[17 of 18] Compiling Language.Haskell.Interpreter.Extension ( src/Language/Ha$
[18 of 18] Compiling Language.Haskell.Interpreter.Unsafe ( src/Language/Haske$
/usr/bin/ld.gold: error: cannot find -ltinfo
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

堆栈版本:

Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0

Cabal-install版本:

cabal-install version 2.0.0.1
compiled using version 2.0.1.1 of the Cabal library 

请指出正确的方向。我对堆栈和Haskell完全不熟悉。

1 个答案:

答案 0 :(得分:3)

您需要为tinfo安装lib 在ubuntu上,例如:

sudo apt install libtinfo-dev