无法加载 HDBC-postgresql
我使用的是Windows XP。我已按照此页面上的步骤安装了 Yesod: http://www.yesodweb.com/page /五分钟
我创建了一个具有 Postgresql 持久性的支架应用程序。当我第一次运行“yesod devel”时,它给了我一个关于缺少某些 postgresql 包的错误(我不记得名字了),所以我使用 cabal 安装了它。现在,当我运行“yesod devel”时,它给出以下错误: <代码>
Loading package HDBC-postgresql-2.2.3.3 ... ghc.exe: pq: The specified module co
uld not be found.
: can't load .so/.DLL for: pq (addDLL: could not load DLL)
yesod: Network.Socket.accept: failed (No error)
I have HDBC-postgresql-2.2.3.3 installed and I have installed it with the --extra-lib-dirs set to the postgresql's bin folder wih all the DLLs but it did not help.据我了解它正在尝试加载pq.dll,但我的系统上没有它,我有libpq.dll,所以我尝试重命名该dll,但无济于事。我迷路了。
请帮助
康斯坦丁
I am on windows XP. I have installed Yesod by following the steps on this page: http://www.yesodweb.com/page/five-minutes
I have created a scaffolded application with Postgresql persistence. When I ran "yesod devel" for the first time it gave me an error about some postgresql package missing (I do not remember the name), so I installed it using cabal. now when I run "yesod devel" it gives me the error below:
Loading package HDBC-postgresql-2.2.3.3 ... ghc.exe: pq: The specified module co uld not be found. : can't load .so/.DLL for: pq (addDLL: could not load DLL) yesod: Network.Socket.accept: failed (No error)
I have HDBC-postgresql-2.2.3.3 installed and I have installed it with the --extra-lib-dirs set to the postgresql's bin folder wih all the DLLs but it did not help.
As far as I understand it is trying to load pq.dll, but I do not have it on my system, I have libpq.dll, so I tried to rename the dll, to no avail. I am lost.
Please help
Konstantin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Windows 上,需要正确设置 %path%。我在“Program Files”下安装了 postgresql,由于某种原因 HDBC-postgresql 不喜欢路径包含空格,所以我最终将 8.3 路径版本添加到 %path% 中,它似乎已经解决了问题。
On Windows, %path% needs to be set correctly. I have postgresql installed under "Program Files", and for some reason HDBC-postgresql does not like the fact that the path contains a space, so I ended up adding the 8.3 path version to the %path% and it seemed to have solved the problem.
您需要正确设置您的 Windows 路径。 Ghc 需要在命令行上将 postgreSQL ODBC 的以下路径设置为“C:\Program Files\PostgreSQL\psqlODBC\0903\bin”(使用 ODBC 版本并进行适当更改)。此外,还应该设置您的 postgreSQL bin 路径。设置 ODBC 路径后安装 odbc 驱动程序。如果 ODBC dll 链接正确,该错误就会消失。如果 odbc 链接未正确完成,则设置 cabal 标志 --extra-lib-dirs 将不起作用。所需的文件 libpq.dll 位于 odbc bin 目录中。
You need to set your windows path correctly. Ghc requires the following path set for postgreSQL ODBC as "C:\Program Files\PostgreSQL\psqlODBC\0903\bin" on the command line(Use ODBC version and change it appropriately). In addition, your postgreSQL bin path should be set. Install the odbc driver after you set the ODBC path. If ODBC dlls are linked properly, the error will disappear. If odbc linking is not done properly, setting cabal flag --extra-lib-dirs will not work. The required file libpq.dll is in odbc bin directory.