如何在使用堆栈安装软件包期间修复 "Bad interface file"?
How to fix "Bad interface file" during installation of package with stack?
我正在尝试使用
安装 stylish-haskell 包
stack install stylish-haskell
但我收到 "Bad interface file" 错误。
安装日志如下:
ptparse-applicative-0.14.3.0.log
Configuring optparse-applicative-0.14.3.0...
Preprocessing library for optparse-applicative-0.14.3.0..
Building library for optparse-applicative-0.14.3.0..
[ 1 of 16] Compiling Options.Applicative.Help.Levenshtein ( Options/Applicative/Help/Levenshtein.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Options/Applicative/Help/Levenshtein.o )
[ 2 of 16] Compiling Options.Applicative.Help.Pretty ( Options/Applicative/Help/Pretty.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Options/Applicative/Help/Pretty.o )
Options/Applicative/Help/Pretty.hs:6:1: error:
Bad interface file: /home/george/.stack/snapshots/x86_64-linux-tinfo6/lts-13.21/8.6.5/lib/x86_64-linux-ghc-8.6.5/ansi-wl-pprint-0.6.8.2-FavuR50rvZs3UXCXkBzL8N/Text/PrettyPrint/ANSI/Leijen.hi
Data.Binary.getPrim: end of file
|
6 | import Text.PrettyPrint.ANSI.Leijen hiding ((<$>), (<>), columns)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
作为duplode has pointed out, this is likely a case of Stack issue #3248。解决方法是 stack exec ghc-pkg unregister ansi-wl-pprint-0.6.8.2
后跟 stack build
,这将触发重新安装受影响的软件包。
我正在尝试使用
安装 stylish-haskell 包stack install stylish-haskell
但我收到 "Bad interface file" 错误。
安装日志如下:
ptparse-applicative-0.14.3.0.log
Configuring optparse-applicative-0.14.3.0...
Preprocessing library for optparse-applicative-0.14.3.0..
Building library for optparse-applicative-0.14.3.0..
[ 1 of 16] Compiling Options.Applicative.Help.Levenshtein ( Options/Applicative/Help/Levenshtein.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Options/Applicative/Help/Levenshtein.o )
[ 2 of 16] Compiling Options.Applicative.Help.Pretty ( Options/Applicative/Help/Pretty.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Options/Applicative/Help/Pretty.o )
Options/Applicative/Help/Pretty.hs:6:1: error:
Bad interface file: /home/george/.stack/snapshots/x86_64-linux-tinfo6/lts-13.21/8.6.5/lib/x86_64-linux-ghc-8.6.5/ansi-wl-pprint-0.6.8.2-FavuR50rvZs3UXCXkBzL8N/Text/PrettyPrint/ANSI/Leijen.hi
Data.Binary.getPrim: end of file
|
6 | import Text.PrettyPrint.ANSI.Leijen hiding ((<$>), (<>), columns)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
作为duplode has pointed out, this is likely a case of Stack issue #3248。解决方法是 stack exec ghc-pkg unregister ansi-wl-pprint-0.6.8.2
后跟 stack build
,这将触发重新安装受影响的软件包。