-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load package postgresql-libpq-0.9.0.0 [Fixed] #18
Comments
Fixed: In my case I had to uninstall version 8.4 client postgres and install version 9.3 and it worked perfectly. The components were reinstalled: |
Yeah, postgresql-libpq version 0.9 introduced the requirement for libpq 9.0 or later. The postgresql community is dropping support for 8.4 this July, and the use case for PQescapeIdentifier is pretty compelling. This is something that I could check in |
Also, did you recompile |
Hello again, now with more time I summarize my experience installing postgresql- libpq and other packages that depend on it : Note: This experience takes place on Centos 6.5 operating system with a client installation Postgresql 8.4: 1 - The hackage postgresql- libpq version 0.9.0.0 can be installed without difficulty. It requires a higher version of postgresql 9 but this is no impediment to a successful installation. 2 - Other dependent packages fail to install, eg: postgresql-simple, haskelldb and persistent-postgresql until the problem of "PQescapeIdentifier" is resolved 3 - El módulo "Database.PostgreSQL.LibPQ" puede ser cargado sin dificultad en una consola de GHC, sin embargo, la función "connectdb" falla debido al caso de uso relacionado con "PQescapeIdentifier". Este incidente está debidamente documentado en el sitio oficial de Postgresql) 4 - The above problem is solved by simply updating the postgres client to a version higher than 9.0 . 5 - Once the correct prostgres client version is installed you can run the " Database.PostgreSQL.LibPQ " module without difficulty, without having to recompile the package back to postgresql- libpq. |
I've run into this problem again on a new machine, but I have PostgreSQL 9.2.8 installed. Is there someway I specify which library to link to? Here are some of my environment variables:
I've tried the following as well, but I still had the same problem:
|
The current I probably ought to take the time to understand the dynamic link process a bit better. |
That's odd then. It looks like
|
My suggestion for finding out what this is being linked against at runtime is to I also saw your questions on #haskell but you ducked out of the channel before I replied. I've found that with GHC 7.8, I need to compile |
Sorry, I had to run last night. Ok, here's an strace of ghci loading Database.PostgreSQL.LibPQ. It looks like it is linking against 8.4:
I need it to link against 9.2:
It's weird because it looks like other libraries are loading from 9.2. Unfortunately, I can't uninstall 8.4 since this is a managed system. |
Ok, I finally figured out the problem. The linker is looking for a file called
Then when you install, use
|
Hi Leon, I was able to successfully install the package "postgresql-libpq-0.9.0.0" on GNU / Linux (Centos 6.5), however, the following runtime error occurs:
Unable to load packagepostgresql-libpq-0.9.0.0
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Database.PostgreSQL.LibPQ
Prelude Database.PostgreSQL.LibPQ> connectdb undefined
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package postgresql-libpq-0.9.0.0 ... linking ... : /home/haskell/.cabal/lib/postgresql-libpq-0.9.0.0/ghc-7.6.3/HSpostgresql-libpq-0.9.0.0.o: unknown symbol
PQescapeIdentifier' ghc: unable to load package
postgresql-libpq-0.9.0.0'Prelude Database.PostgreSQL.LibPQ>
The text was updated successfully, but these errors were encountered: