[Mono-list] libpq.so error

Jonathan Stowe gellyfish@gellyfish.com
Mon, 26 May 2003 19:35:41 +0100 (BST)

On Mon, 26 May 2003, amerigo5 amerigo5 wrote:

> I am getting the following error:
> ** (postgres.exe:2407): WARNING **: Failed to load library libpq.so
> (libpq.so):
> libpq.so: cannot open shared object file: No such file or directory
> Unhandled Exception: System.MissingMethodException: A missing method
> exception has occurred.
> in <0x00046> 06 Mono.Data.PostgreSqlClient.PostgresLibrary:PQconnectdb
> (string)
> in <0x000ae> 00 Mono.Data.PostgreSqlClient.PgSqlConnection:Open ()
> in <0x00052> 00 .Test:Main (string[])
> Does anyone know what this mean? Thanks.

Yes, it is likely that you don't have the postgres libraries installed in
a place that they can be found by applications.  You should check for its
presence with:

  locate libpq.so

This should return the location of the library on your machine.  If it
doesn't return anything a) you don't have the postgres client libraries
installed and you will need to install them or b) you haven't run updatedb
since you installed them.

If you do get something back from the locate then if the path is not in
either /usr/lib or /usr/local/lib then you will have to become root
and edit the file /etc/ld.so.conf to add the directory where the library
is located.  After you have done that you will need to run /sbin/ldconfig
to add the libraries in that location to the cache.

Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent