无法在 Windows 上安装我的 Hakyll 博客(网络库问题)

Cannot install my Hakyll blog on Windows (issue with network library)

我的 Ubuntu 笔记本电脑没电了。所以我正在尝试在 Windows 上为我的 Hakyll blog 安装 Haskell 项目。我没有对源代码和 stack.yaml 文件进行任何更改,并且安装了 Haskell 平台。库 network 编译失败。当我这样做时

stack install network

我收到这些错误消息:

network> * Missing (or bad) header file: HsNet.h
network> This problem can usually be solved by installing the system package that
network> provides this library (you may need the "-dev" version). If the library is
network> already installed but in a non-standard location then you can use the flags
network> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
network> library file does exist, it may contain errors that are caught by the C
network> compiler at the preprocessing stage. In this case you can re-run configure
network> with the verbosity flag -v3 to see the error messages.
network> If the header file does exist, it may contain errors that are caught by the C
network> compiler at the preprocessing stage. In this case you can re-run configure
network> with the verbosity flag -v3 to see the error messages.
network>

--  While building package network-3.1.1.1 (scroll up to its section to see the error) using:
      C:\Users\sdl96354\AppData\Local\Temp\stack-8431997fcaa12db3\network-3.1.1.1\.stack-work\distcc6475\setup\setup --builddir=.stack-work\distcc6475 configure --with-ghc=C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.4\bin\ghc-8.8.4.exe --with-ghc-pkg=C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.4\bin\ghc-pkg.exe --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\ce41ca4b\pkgdb --libdir=C:\sr\snapshots\ce41ca4b\lib --bindir=C:\sr\snapshots\ce41ca4b\bin --datadir=C:\sr\snapshots\ce41ca4b\share --libexecdir=C:\sr\snapshots\ce41ca4b\libexec --sysconfdir=C:\sr\snapshots\ce41ca4b\etc --docdir=C:\sr\snapshots\ce41ca4b\doc\network-3.1.1.1 --htmldir=C:\sr\snapshots\ce41ca4b\doc\network-3.1.1.1 --haddockdir=C:\sr\snapshots\ce41ca4b\doc\network-3.1.1.1 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.1 --dependency=deepseq=deepseq-1.4.4.0 --extra-include-dirs=C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\msys2-20210604\mingw64\include --extra-lib-dirs=C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\msys2-20210604\mingw64\lib --extra-lib-dirs=C:\Users\sdl96354\AppData\Local\Programs\stack\x86_64-windows\msys2-20210604\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1

我不知道该怎么办,如果有任何帮助,我将不胜感激。

错误表明您缺少某些系统库,它是 haskell network package 的依赖项。

所以您可以了解 how haskell stack works on Windows and look at questions about compilation of network package on windows,或者您可以安装一些 GNU/Linux 发行版作为虚拟机并照常工作。