我的 Ubuntu 筆記本電腦死了。所以我正在嘗試在 Windows 上為我的Hakyll 博客安裝 Haskell 專案。我沒有對源代碼和stack.yaml檔案做任何改動,我安裝了Haskell平臺。圖書館網路無法編譯。當我做
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\dist\29cc6475\setup\setup --builddir=.stack-work\dist\29cc6475 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
我不知道我該怎么做,我會很感激任何幫助。
uj5u.com熱心網友回復:
該錯誤表明您缺少一些系統庫,這是 haskell network package的依賴項。
因此,您可以了解haskell 堆疊在 Windows 上的作業原理并查看有關在 windows 上編譯網路包的問題,??或者您可以將一些 GNU/Linux 發行版安裝為虛擬機并照常作業。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/462823.html
