Обсуждение: Need your help (frustrating issue)

Поиск
Список
Период
Сортировка

Need your help (frustrating issue)

От
"Siddharth Rath (sirath)"
Дата:
Hi ,
I'm facing an issue with Postgresql 7.3.4.
I've installed DBI version 1.37 & DBD::Pg (1.22) on a Solaris  8  machine w/ perl 5.6.1 .The basic
problem is I can connect to Postgres just fine from the command line, but it
craps out when I try from a CGI with the below error message:
install_driver(Pg) failed: Can't load '/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open failed: No such file or directory at /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
 at (eval 1) line 3
 
 
 
I got an link in google that says :

Christoph Lange <[PRIVACY PROTECTION]> writes: > install_driver(Pg) failed: Can't load > '/soft/perl/lib/site_perl/sun4-solaris/auto/DBD/Pg/Pg.so' for module DBD::Pg: ld.so.1: /soft/local/bin/perl: fatal: > libpq.so: open

failed: No such file or directory!

Probably you have not told ldconfig where to look for libpq.so. The directory containing that shlib needs to be part of the system search path for shlibs (/etc/ld.so.conf I think). regards, tom lane


It's Solaris, so there's no ldconfig to work on the fly's of libraries .I did put the LD_LIBRARY_PATH correctly in the cgi  itself , hoping that it would work out, but it didnt help me out.

Can you please help me out in resolving it.

Thanx and regards

Sidd

Re: Need your help (frustrating issue)

От
Matt Davies
Дата:
In the past, I have always put the LD_LIBRARY_PATH environment setting in the
/etc/profile (make sure to export it if necessary) and that seemed to solve all
my problems.

Make sure you are setting the LD_LIBRARY_PATH _environment_ variable in your cgi
not just a varible named LD_LIBRARY_PATH.

Yet one more solution, and I don't know if it is possible or not, is to wrap
your application with a small script that will set the environment for you such
as:

#!/bin/sh

export LD_LIBRARY_PATH=.....

/usr/local/apache/cgi/asd.cgi (or the like)




HTH's

Matt

Quoting "Siddharth Rath (sirath)" <sirath@cisco.com>:

> Hi ,
> I'm facing an issue with Postgresql 7.3.4.
> I've installed DBI version 1.37 & DBD::Pg (1.22) on a Solaris  8
> machine w/ perl 5.6.1 .The basic
> problem is I can connect to Postgres just fine from the command line,
> but it
> craps out when I try from a CGI with the below error message:
> install_driver(Pg) failed: Can't load
> '/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module
> DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open
> failed: No such file or directory at
> /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
>  at (eval 1) line 3
>
>
>
> I got an link in google that says :
> Christoph Lange <[PRIVACY PROTECTION]> writes: > install_driver(Pg)
> failed: Can't load >
> '/soft/perl/lib/site_perl/sun4-solaris/auto/DBD/Pg/Pg.so' for module
> DBD::Pg: ld.so.1: /soft/local/bin/perl: fatal: > libpq.so: open
>
> failed: No such file or directory!
>
> Probably you have not told ldconfig where to look for libpq.so. The
> directory containing that shlib needs to be part of the system search
> path for shlibs (/etc/ld.so.conf I think). regards, tom lane
>
>
> It's Solaris, so there's no ldconfig to work on the fly's of libraries
> .I did put the LD_LIBRARY_PATH correctly in the cgi  itself , hoping
> that it would work out, but it didnt help me out.
>
> Can you please help me out in resolving it.
>
> Thanx and regards
>
> Sidd
>
>




Re: Need your help (frustrating issue)

От
"Siddharth Rath (sirath)"
Дата:
Hi Matt,
Thanx for the response. Actually I did put the
LD_LIBRARY_PATH as $ENV{LD_LIBRARY_PATH}=
Hope you meant the same way. Somehow it doesn't workout.
Secondly since I done have access to /usr/local or /etc/profile
I did install the postgresql and DBD::Pg as per below.

 /path_to_preferred_perl_version/perl -I /apps/myapp/perl/lib
Makefile.PL PREFIX=/apps/myapp/perl LIB=/apps/myapp/perl/lib

The issue is yet to resolved ,please let me know if theres any other way
to resolve the same.

Thanx and regards
Sidd
-----Original Message-----
From: Matt Davies [mailto:matt@mattdavies.net]
Sent: Thursday, November 20, 2003 1:25 PM
To: sirath@cisco.com
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Need your help (frustrating issue)


In the past, I have always put the LD_LIBRARY_PATH environment setting
in the /etc/profile (make sure to export it if necessary) and that
seemed to solve all my problems.

Make sure you are setting the LD_LIBRARY_PATH _environment_ variable in
your cgi not just a varible named LD_LIBRARY_PATH.

Yet one more solution, and I don't know if it is possible or not, is to
wrap your application with a small script that will set the environment
for you such
as:

#!/bin/sh

export LD_LIBRARY_PATH=.....

/usr/local/apache/cgi/asd.cgi (or the like)




HTH's

Matt

Quoting "Siddharth Rath (sirath)" <sirath@cisco.com>:

> Hi ,
> I'm facing an issue with Postgresql 7.3.4.
> I've installed DBI version 1.37 & DBD::Pg (1.22) on a Solaris  8
> machine w/ perl 5.6.1 .The basic
> problem is I can connect to Postgres just fine from the command line,
> but it
> craps out when I try from a CGI with the below error message:
> install_driver(Pg) failed: Can't load
> '/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module
> DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open
> failed: No such file or directory at
> /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
>  at (eval 1) line 3
>
>
>
> I got an link in google that says :
> Christoph Lange <[PRIVACY PROTECTION]> writes: > install_driver(Pg)
> failed: Can't load >
> '/soft/perl/lib/site_perl/sun4-solaris/auto/DBD/Pg/Pg.so' for module
> DBD::Pg: ld.so.1: /soft/local/bin/perl: fatal: > libpq.so: open
>
> failed: No such file or directory!
>
> Probably you have not told ldconfig where to look for libpq.so. The
> directory containing that shlib needs to be part of the system search
> path for shlibs (/etc/ld.so.conf I think). regards, tom lane
>
>
> It's Solaris, so there's no ldconfig to work on the fly's of libraries

> .I did put the LD_LIBRARY_PATH correctly in the cgi  itself , hoping
> that it would work out, but it didnt help me out.
>
> Can you please help me out in resolving it.
>
> Thanx and regards
>
> Sidd
>
>





Re: Need your help (frustrating issue)

От
fred@redhotpenguin.com
Дата:
I've had this problem (or something very similar) happen before several
times on new installations.  I think I resolved it by re-installing
DBD::Pg - but this was a while ago.

Are you sure Pg.so is in your @INC path?

Try adding this to your CGI to be sure it's looking in the right place.
use lib qw(/path_to_preferred_perl_version/perl /apps/myapp/perl/lib);

> Hi Matt,
> Thanx for the response. Actually I did put the
> LD_LIBRARY_PATH as $ENV{LD_LIBRARY_PATH}=
> Hope you meant the same way. Somehow it doesn't workout.
> Secondly since I done have access to /usr/local or /etc/profile
> I did install the postgresql and DBD::Pg as per below.
>
>  /path_to_preferred_perl_version/perl -I /apps/myapp/perl/lib
> Makefile.PL PREFIX=/apps/myapp/perl LIB=/apps/myapp/perl/lib
>
> The issue is yet to resolved ,please let me know if theres any other way
> to resolve the same.
>
> Thanx and regards
> Sidd
> -----Original Message-----
> From: Matt Davies [mailto:matt@mattdavies.net]
> Sent: Thursday, November 20, 2003 1:25 PM
> To: sirath@cisco.com
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Need your help (frustrating issue)
>
>
> In the past, I have always put the LD_LIBRARY_PATH environment setting
> in the /etc/profile (make sure to export it if necessary) and that
> seemed to solve all my problems.
>
> Make sure you are setting the LD_LIBRARY_PATH _environment_ variable in
> your cgi not just a varible named LD_LIBRARY_PATH.
>
> Yet one more solution, and I don't know if it is possible or not, is to
> wrap your application with a small script that will set the environment
> for you such
> as:
>
> #!/bin/sh
>
> export LD_LIBRARY_PATH=.....
>
> /usr/local/apache/cgi/asd.cgi (or the like)
>
>
>
>
> HTH's
>
> Matt
>
> Quoting "Siddharth Rath (sirath)" <sirath@cisco.com>:
>
>> Hi ,
>> I'm facing an issue with Postgresql 7.3.4.
>> I've installed DBI version 1.37 & DBD::Pg (1.22) on a Solaris  8
>> machine w/ perl 5.6.1 .The basic
>> problem is I can connect to Postgres just fine from the command line,
>> but it
>> craps out when I try from a CGI with the below error message:
>> install_driver(Pg) failed: Can't load
>> '/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module
>> DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open
>> failed: No such file or directory at
>> /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
>>  at (eval 1) line 3
>>
>>
>>
>> I got an link in google that says :
>> Christoph Lange <[PRIVACY PROTECTION]> writes: > install_driver(Pg)
>> failed: Can't load >
>> '/soft/perl/lib/site_perl/sun4-solaris/auto/DBD/Pg/Pg.so' for module
>> DBD::Pg: ld.so.1: /soft/local/bin/perl: fatal: > libpq.so: open
>>
>> failed: No such file or directory!
>>
>> Probably you have not told ldconfig where to look for libpq.so. The
>> directory containing that shlib needs to be part of the system search
>> path for shlibs (/etc/ld.so.conf I think). regards, tom lane
>>
>>
>> It's Solaris, so there's no ldconfig to work on the fly's of libraries
>
>> .I did put the LD_LIBRARY_PATH correctly in the cgi  itself , hoping
>> that it would work out, but it didnt help me out.
>>
>> Can you please help me out in resolving it.
>>
>> Thanx and regards
>>
>> Sidd
>>
>>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>


Re: Need your help (frustrating issue)

От
"Siddharth Rath (sirath)"
Дата:
Hi Fred/Matt,
I'm still stuck-up at the same issue
(/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module
 DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open
 failed: No such file or directory at
 /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
  at (eval 1) line 3) .

I did get the following mesg while deploying the POSTGRESQL server.
        *** Cannot build PL/Perl because libperl is not a shared
library.
        *** You might have to rebuild your Perl installation.  Refer to
        *** the documentation for details.
It will' be really great if you please let me know whether I'm facing
the issue coz libperl is not  shared library?

Thanx and regards
Sidd


-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of
fred@redhotpenguin.com
Sent: Thursday, November 20, 2003 3:12 PM
To: sirath@cisco.com
Cc: 'Matt Davies'; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Need your help (frustrating issue)


I've had this problem (or something very similar) happen before several
times on new installations.  I think I resolved it by re-installing
DBD::Pg - but this was a while ago.

Are you sure Pg.so is in your @INC path?

Try adding this to your CGI to be sure it's looking in the right place.
use lib qw(/path_to_preferred_perl_version/perl /apps/myapp/perl/lib);

> Hi Matt,
> Thanx for the response. Actually I did put the LD_LIBRARY_PATH as
> $ENV{LD_LIBRARY_PATH}= Hope you meant the same way. Somehow it doesn't

> workout. Secondly since I done have access to /usr/local or
> /etc/profile I did install the postgresql and DBD::Pg as per below.
>
>  /path_to_preferred_perl_version/perl -I /apps/myapp/perl/lib
> Makefile.PL PREFIX=/apps/myapp/perl LIB=/apps/myapp/perl/lib
>
> The issue is yet to resolved ,please let me know if theres any other
> way to resolve the same.
>
> Thanx and regards
> Sidd
> -----Original Message-----
> From: Matt Davies [mailto:matt@mattdavies.net]
> Sent: Thursday, November 20, 2003 1:25 PM
> To: sirath@cisco.com
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Need your help (frustrating issue)
>
>
> In the past, I have always put the LD_LIBRARY_PATH environment setting

> in the /etc/profile (make sure to export it if necessary) and that
> seemed to solve all my problems.
>
> Make sure you are setting the LD_LIBRARY_PATH _environment_ variable
> in your cgi not just a varible named LD_LIBRARY_PATH.
>
> Yet one more solution, and I don't know if it is possible or not, is
> to wrap your application with a small script that will set the
> environment for you such
> as:
>
> #!/bin/sh
>
> export LD_LIBRARY_PATH=.....
>
> /usr/local/apache/cgi/asd.cgi (or the like)
>
>
>
>
> HTH's
>
> Matt
>
> Quoting "Siddharth Rath (sirath)" <sirath@cisco.com>:
>
>> Hi ,
>> I'm facing an issue with Postgresql 7.3.4.
>> I've installed DBI version 1.37 & DBD::Pg (1.22) on a Solaris  8
>> machine w/ perl 5.6.1 .The basic problem is I can connect to Postgres

>> just fine from the command line, but it
>> craps out when I try from a CGI with the below error message:
>> install_driver(Pg) failed: Can't load
>> '/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module
>> DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open
>> failed: No such file or directory at
>> /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
>>  at (eval 1) line 3
>>
>>
>>
>> I got an link in google that says :
>> Christoph Lange <[PRIVACY PROTECTION]> writes: > install_driver(Pg)
>> failed: Can't load >
>> '/soft/perl/lib/site_perl/sun4-solaris/auto/DBD/Pg/Pg.so' for module
>> DBD::Pg: ld.so.1: /soft/local/bin/perl: fatal: > libpq.so: open
>>
>> failed: No such file or directory!
>>
>> Probably you have not told ldconfig where to look for libpq.so. The
>> directory containing that shlib needs to be part of the system search

>> path for shlibs (/etc/ld.so.conf I think). regards, tom lane
>>
>>
>> It's Solaris, so there's no ldconfig to work on the fly's of
>> libraries
>
>> .I did put the LD_LIBRARY_PATH correctly in the cgi  itself , hoping
>> that it would work out, but it didnt help me out.
>>
>> Can you please help me out in resolving it.
>>
>> Thanx and regards
>>
>> Sidd
>>
>>
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that
your
>       message can get through to the mailing list cleanly
>


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


Re: Need your help (frustrating issue)

От
fred@redhotpenguin.com
Дата:
> Hi Fred/Matt,
> I'm still stuck-up at the same issue
> (/apps/systran/perl/lib/sun4-solaris/auto/DBD/Pg/Pg.so' for module
>  DBD::Pg: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open
>  failed: No such file or directory at
>  /usr/local/perl5.6.1/lib/sun4-solaris/DynaLoader.pm line 206.
>   at (eval 1) line 3) .
>
> I did get the following mesg while deploying the POSTGRESQL server.
>         *** Cannot build PL/Perl because libperl is not a shared
> library.
>         *** You might have to rebuild your Perl installation.  Refer to
>         *** the documentation for details.
> It will' be really great if you please let me know whether I'm facing
> the issue coz libperl is not  shared library?
<snip>

It looks like you'll need to rebuild perl with the shared library option
enabled to enable it's use by PL/Perl.  The first message references
/usr/local/bin/perl so I'm assuming the superuser did a source install of
5.6.1 with the default options.  I suggest you install perl from source in
your /apps/systran/ directory and enable the option to build a shared
libperl.  Once you do that add /apps/systran/perl/bin to your PATH and
open/refresh your shell.

After you have this installed, type 'perl -V' and you should see
/apps/systran/perl/... several times in the @INC array, and also the
command 'which perl' should return /apps/systran/perl/bin/perl.  Now
re-install DBD::Pg - since you are using /apps/systran/perl/bin/perl you
don't need to specify a prefix, it will be installed under the
/apps/systran tree.  This should take care of the DynaLoader error.

Now build Postgres again and you should be all good - you have your own
custom perl application and library that other system users won't
accidentally squash.  Here's a good reference link to getting your own
perl apps/libraries installed.

http://www.perl.com/pub/a/2002/04/10/mod_perl.html

Feel free to bounce any perl installation questions at me off the list -
this procedure should take care of the dependencies and get you going.