[Slackbuilds-users] PostgreSQL - multiple installed versions

Thomas Morper thomas at beingboiled.info
Sun Sep 29 23:58:02 UTC 2013


On Sun, 29 Sep 2013, Audrius Kažukauskas wrote:

> I have successfully upgraded from 9.2.4 to 9.3.0 and then encountered the
> problem: while psycopg2 (Python DB adapter for Postgres) builds fine,
> trying to use it results in the following error:
> 
>   ImportError: libpq.so.5: cannot open shared object file: No such file
>   or directory

The setup.py for psycopg2 asks pg_config for config options, but ignores 
the required LDFLAGS. As a workaround, you could specify the flags while 
building the package, e.g.:

  env LDFLAGS="$(pg_config --ldflags)" sh psycopg2.SlackBuild

It's easy to adapt the SlackBuild accordingly, but maybe it would be 
better to address this in psycopg2 itself.

-- 


More information about the SlackBuilds-users mailing list