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

`gcc' failed in phase `Linker', can't build 'hint' package

所以,我的 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 安装版本:

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

请指出正确的方向。我对堆栈和 Haskell.

完全陌生

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

sudo apt install libtinfo-dev