安装 cabal 包时出错(无法确定 mingw 版本)

Error when installing cabal package (cannot determine mingw version)

我想使用 cabal 安装一个包,但是我得到这个错误:

Warning: cannot determine version of D:\Program Files\Haskell
Platform.0.2\mingw\bin\gcc.exe :
""
`gcc.exe' failed in phase `C Compiler'. (Exit code: -1073741502)

包裹是stm:

cabal install stm

我已经在我的 Windows 10 PC 上安装了 Haskell Platform 的完整 x64 版本。

错误与这里几乎相同:https://github.com/haskell/cabal/issues/4442

但是没有人回答

Win10 Creators Update 更改了一些受ghc 影响的API。您可能会看到此结果。如果您有 Win 10 build 15019 或更高版本,请按照 ghc-compat repo 中的详细说明更换您的 gcc.exe,看看是否有帮助。