我可以编译Hakyll,但是当我尝试运行它时会出现链接错误 首先我将Hakyll安装在沙盒中:
cabal sandbox init
cabal install Hakyll
这成功完成。
然后我使用hakyll-init
创建一个普通站点并将文件移到目录中:
.cabal-sandbox/bin/hakyll-init mysite
mv mysite/* .
rm -rf mysite
然后我尝试用cabal exec -- runghc site.hs build
运行它,然后我得到:
site.hs: <command line>: can't load .so/.DLL for: /Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib (dlopen(/Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib, 5): no suitable image found. Did find:
/Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib: malformed mach-o: load commands size (32992) > 32768
/Users/john/repositories/CP/principles-of-concurrent-programming/Website/.cabal-sandbox/lib/x86_64-osx-ghc-8.2.1/libHSpandoc-citeproc-0.10.5.1-97wWmtk04v65Etcjop52Rs-ghc8.2.1.dylib: malformed mach-o: load commands size (32992) > 32768)
site.hs
的内容完全是标准的。我已将文件上传到gist。任何帮助将不胜感激!
答案 0 :(得分:1)
虽然不能完全解决我的问题,但我设法通过堆栈安装Hakyll来解决这个问题。为了记录,这些是我的步骤:
brew install haskell-stack
stack setup
stack install hakyll
然后建立网站:
stack exec -- runghc site.hs build