"libpq.so" is part of the PostgreSQL package.  You need to make sure you
have $POSTGREPSQL_HOME/lib in your LD_LIBRARY_PATH.  Where POSTGREPSQL_HOME
is the location you have postgreSQL installed.

In my case, on Solaris in /usr/local/pgsql

nexthawk:/# cd /usr/local/pgsql/lib
nexthawk:/usr/local/pgsql/lib# ls
libecpg.a          libpgeasy.so.2@    libpq++.a          libpq.so.2@
libecpg.so@        libpgeasy.so.2.1*  libpq++.so@        libpq.so.2.1*
libecpg.so.3@      libpgtcl.a         libpq++.so.3@      plperl.so*
libecpg.so.3.2.0*  libpgtcl.so@       libpq++.so.3.1*    plpgsql.so*
libpgeasy.a        libpgtcl.so.2@     libpq.a            pltcl.so*
libpgeasy.so@      libpgtcl.so.2.1*   libpq.so@

That should take care of your peoblem.

Mike



On Mon, Nov 12, 2001 at 06:16:16AM +0900, Michael Neumann wrote:
> Chris Reay wrote:
> > Hi
> > 
> > I have successfully built and installed the ruby-postgres extension,
> > but as soon as I call require 'postgres' I get the following ...
> > 
> > Postgres.rb:4:in `require': libpq.so.2: cannot open shared object
> > file: No
> > such
> > file or directory - /usr/local/lib/ruby/1.6/i686-linux/postgres.so
> > (LoadError)
> >         from Postgres.rb:4
> > 
> > However postgres.so _does_ exist ...
> 
> No, it doesn't find the libpq.so file.
> 
> Type in:
> 
>   ldd /usr/local/lib/ruby/1.6/i686-linux/postgres.so
> 
> When I do this on my system, the following appears:
> 
>         -lcrypt.0 => /usr/lib/libcrypt.so.0
>         -lm.0 => /usr/lib/libm387.so.0
>         -lm.0 => /usr/lib/libm.so.0
>         -lruby => /usr/pkg/lib/libruby.so
>         -lssl.2 => /usr/lib/libssl.so.2
>         -lcrypto.1 => /usr/lib/libcrypto.so.1
>         -lresolv.1 => /usr/lib/libresolv.so.1
>         -lpq.2 => /usr/pkg/lib/libpq.so.2
>         -lc.12 => /usr/lib/libc.so.12
> 
> On yours I am sure there is a line
> 
>         -lpq.2 => not found
> 
> To fix this just add the path to "libpq.so.2" to your 
> environment variable "LD_LIBRARY_PATH".
> 
> Regards,
> 
>   Michael
> 
> -- 
> Michael Neumann
> merlin.zwo InfoDesign GmbH
> http://www.merlin-zwo.de

-- 
Michael P. Sullivan                                  
Distributed Computing Systems, LLC                         Cell: 516-429-2080 
E-Mail: mps / discomsys.com                           http://www.discomsys.com/ 
    * UNIX Systems and Database Consulting, Architecture and Management *
"Failing to plan, is planning to fail... plan for the worst, hope for the best"