Cabal 安装需要 C 库:Windows
我正在尝试在我的 Windows 计算机上cabal install yesod
。我有一个相对全新的 Haskell 平台安装。 cabal 安装失败,报告我需要 sqlite3 C 库才能安装 Yesod 所依赖的“持久”包。
cabal:缺少对外部库的依赖: * 缺少 C 库:sqlite3
所以我去了 http://www.sqlite.org/download.html 并获取了 C 源代码和预编译的二进制。我尝试使用两者,但无济于事:
cabal install persistent --extra-lib-dirs=C:\Path\To\C\Source\Files
cabal install persistent --extra-lib-dirs=C:\Path\To\Binary
在这两种情况下,我得到了相同的结果:它不起作用。 :( 我该怎么做才能为 cabal 提供它需要的 C 库?(在本例中为 sqlite3)
I am trying to cabal install yesod
on my Windows machine. I have a relatively fresh install of the Haskell Platform. The cabal install failed, reporting that I need the sqlite3 C library in order to install "persistent", a package which Yesod relies upon.
cabal: Missing dependency on a foreign library: * Missing C library: sqlite3
So I went to http://www.sqlite.org/download.html and grabbed both the C source and the precompiled binary. I tried using both, to no avail:
cabal install persistent --extra-lib-dirs=C:\Path\To\C\Source\Files
cabal install persistent --extra-lib-dirs=C:\Path\To\Binary
In both cases, I got the same result: it didn't work. :( What can I do to give cabal the C library it needs? (sqlite3 in this case)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以,捂脸。我不需要源代码,我不需要exe。 我需要 dll。
在我的问题中提到的网站的“预编译的 Windows 二进制文件”部分下,我下载并提取了带有
sqlite3.def
和的 zip 文件。 >sqlite.dll
。然后我使用安装似乎已经成功完成。之后,我执行了
cabal install yesod
,它似乎也已成功完成。我想如果我把 dll 放在神奇的地方,那么我就不必使用
--extra-lib-dirs=
选项。So, facepalm. I didn't need the source, I didn't need the exe. I needed the dll.
Under the "precompiled binaries for Windows" section of the website mentioned in my question, I downloaded and extracted the zip file with
sqlite3.def
andsqlite.dll
. Then I usedThe installation appears to have completed successfully. Afterwards, I did a
cabal install yesod
, which also appears to have completed successfully.I suppose if I had put the dll somewhere magical, then I wouldn't have had to use the
--extra-lib-dirs=
option.