如何在安装带有堆栈的软件包期间修复“错误的界面文件”



我正在尝试安装 styleish-haskell 软件包

stack install stylish-haskell

但我收到"界面文件错误"错误。

以下是安装日志:

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 所指出的,这可能是堆栈问题 #3248 的情况。解决方法是stack exec ghc-pkg unregister ansi-wl-pprint-0.6.8.2后跟 stack build ,这将触发重新安装受影响的软件包。

相关内容

最新更新