Re: OT but: How to let Perl know of a library location



Thomas Maier-Komor wrote:
Thommy M. schrieb:
I've a SXCE_b81_x86 which I configured using the built in Apache 2.2,
MySQL 5, and PHP 5. I can run phpinfo() and a simple DB access, no
problems.

I then set up the Koha library server from http:://www.koha.org and
configures loads of perl modules from CPAN. Setup also contains Yaz
which installs libyaz.so in /usr/local/lib



Testing Koha from browser is OK except for one part where the error log
looks like below. So, question: How can I have perl understanding that
the libyaz.so library is to be found in /usr/local/lib ???

Or is it that PHP5 is not compiled with yaz? If so, how do I add yaz.so
to PHP extensions with pecl? pecl is not included in the /usr/php5/bin
dir...



[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] Can't load
'/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/auto/Net/Z3950/ZOOM/ZOOM.so'

for module Net::Z3950::ZOOM: ld.so.1: perl: fatal: libyaz.so.3: open
failed: No such file or directory at
/usr/perl5/5.8.4/lib/i86pc-solaris-64int/XSLoader.pm line 68., referer:
http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl
[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] at
/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/Net/Z3950/ZOOM.pm line
12, referer: http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl
[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] Compilation
failed in require at
/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/ZOOM.pm line 6., referer:
http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl
[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] BEGIN
failed--compilation aborted at
/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/ZOOM.pm line 6., referer:
http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl
[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] Compilation
failed in require at /usr/local/koha/intranet/cgi-bin/z3950/search.pl
line 30., referer:
http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl
[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] BEGIN
failed--compilation aborted at
/usr/local/koha/intranet/cgi-bin/z3950/search.pl line 30., referer:
http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl
[Fri Feb 22 17:12:40 2008] [error] [client 192.168.0.112] Premature end
of script headers: search.pl, referer:
http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl

you can check which libraries are linked against an executable by
executing ldd on the executable (e.g. ldd /bin/ls). To tell the
executable (in fact the dynamic linker ld.so.1) where to find libraries
you can set the environment varialbe LD_LIBRARY_PATH. Do so only in a
wrapper script or by using /usr/bin/env but not as a general shell
environment variable.

Take a look at the ld.so.1(1) man page for more information.

Thanks for the replay. I was trying to avoid setting LD_LIBRARY_PATH. I
tried setting the PERL5LIB to /usr/local/lib but that didn't help.
However it seems as if perl (and php) looks for libs in /usr/sfw/lib so
I just copied the libyaz stuff there. The ugliest I've ever done, but as
it is a one app server and I documented it well I can live with it...

If this doesn't work, you'll probably have to rebuild from scratch...

That's another thing I tried to avoid. One of my goals was to use
untouched Apache 2.2, MySQL5, Perl5, and PHP5 for this.

Please see http://www.at-hardeberga.com/koha.html for more...

.



Relevant Pages

  • Re: OT but: How to let Perl know of a library location
    ... MySQL 5, and PHP 5. ... configures loads of perl modules from CPAN. ... 12, referer: http://lmgkoha:8080/cgi-bin/koha/acqui.simple/addbiblio.pl ... you can check which libraries are linked against an executable by executing ldd on the executable. ...
    (comp.unix.solaris)
  • Re: What are the differences between Perl and PHP when handling with Web pages
    ... What are the differences between Perl and PHP? ... anyway for the sake of good programming practice. ... I end up using PHP more for web development than PHP. ...
    (perl.beginners)
  • Re: Can a Perl Programmer Pick up PHP quickly?
    ... PHP is not easier compared to Perl. ... a language with fewer features is going to be easier to ... You can't call documentation guessed after the source not good ...
    (comp.lang.perl.misc)
  • Re: Face lift survey
    ... But PHP, I think, integrates html code a better way. ... you still have to do a perl script and then put ... Perl CGI programming! ...
    (perl.beginners)
  • Re: Coverting perl to php
    ... I am bout ready to convert it to php but wonder if there are ... but there's nothing to match a good perl person porting their ... The reason for the rewrite is because a large chunk of the ancilary ... code to talk to the database, recreating what they did, and having 2 ...
    (comp.lang.php)