Thread: Problem with pl/perl in postgresql 8.0rc1
Hello, I am very new to postgresql and was excited to see that pl/perl was able to do more in the newest version. So I created a database to learn some of is feature. But when I try to to do: createlang plperl test I get: createlang: language installation failed: ERROR: could not load library "/usr/lib/pgsql/plperl.so": libperl.so: cannot open shared object file: No such file or directory I tried installing some of the other languages and they seem to work. I am using the postgresql8.0rc1 rpms for FC3. I even try the srpm to compile it myself but I get the same results. If anyone could tell me what I'm doing wrong that would be great. Thanks, Robert Boone
am Fri, dem 17.12.2004, um 8:54:45 -0600 mailte Robert Boone folgendes: > Hello, > > I am very new to postgresql and was excited to see that pl/perl was able > to do more in the newest version. So I created a database to learn some > of is feature. But when I try to to do: > > createlang plperl test > > I get: > createlang: language installation failed: ERROR: could not load > library "/usr/lib/pgsql/plperl.so": libperl.so: cannot open shared > object file: No such file or directory I use PG 7.4.5 on Debian, and I found the libperl.so there: /usr/lib/postgresql/lib/plperl.so Try to find the file plperl.so. Regards, Andreas -- Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau- fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)
Hello, "/usr/lib/pgsql/plperl.so" is the only plperl.so I have. To check I did: find / -name plperl.so And the only result was: /usr/lib/pgsql/plperl.so Have any other ideas of what might be wrong? Robert Boone On Fri, 2004-12-17 at 16:34 +0100, Kretschmer Andreas wrote: > am Fri, dem 17.12.2004, um 8:54:45 -0600 mailte Robert Boone folgendes: > > Hello, > > > > I am very new to postgresql and was excited to see that pl/perl was able > > to do more in the newest version. So I created a database to learn some > > of is feature. But when I try to to do: > > > > createlang plperl test > > > > I get: > > createlang: language installation failed: ERROR: could not load > > library "/usr/lib/pgsql/plperl.so": libperl.so: cannot open shared > > object file: No such file or directory > > I use PG 7.4.5 on Debian, and I found the libperl.so there: > /usr/lib/postgresql/lib/plperl.so > > Try to find the file plperl.so. > > > Regards, Andreas
On Fri, Dec 17, 2004 at 10:04:29AM -0600, Robert Boone wrote: > "/usr/lib/pgsql/plperl.so" is the only plperl.so I have. To check I > did: > find / -name plperl.so > And the only result was: > /usr/lib/pgsql/plperl.so The error message is complaining about libperl.so, not plperl.so. If you run "ldd /usr/lib/pgsql/plperl.so", one of the lines will probably look like this: libperl.so => not found Run "locate libperl.so" or "find / -name libperl.so" and see if you have that file, which should be part of your Perl installation. If not, then maybe your Perl was built without shared library support. -- Michael Fuhr http://www.fuhr.org/~mfuhr/
Robert Boone <robert@rlb3.com> writes: > I get: > createlang: language installation failed: ERROR: could not load > library "/usr/lib/pgsql/plperl.so": libperl.so: cannot open shared > object file: No such file or directory You have to read the message carefully: plperl.so is trying to invoke libperl.so, and that file is the one that's not being found. This suggests to me that your Perl installation isn't quite the same as the one the RPM was built against. Try readelf -d /usr/lib/pgsql/plperl.so and see if there's an RPATH entry. On my plperl.so I see 0x0000000f (RPATH) Library rpath: [/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE] and indeed I have /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so so everything works. But with all those version numbers buried in the path, a slightly different Perl vintage would make it break. regards, tom lane
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On Fri, 17 Dec 2004, Robert Boone wrote: > I am very new to postgresql and was excited to see that pl/perl was able > to do more in the newest version. So I created a database to learn some > of is feature. But when I try to to do: > > createlang plperl test > > I get: > createlang: language installation failed: ERROR: could not load > library "/usr/lib/pgsql/plperl.so": libperl.so: cannot open shared > object file: No such file or directory > > I tried installing some of the other languages and they seem to work. > > I am using the postgresql8.0rc1 rpms for FC3. I even try the srpm to > compile it myself but I get the same results. > > If anyone could tell me what I'm doing wrong that would be great. This is known issue on FC3, and we fixed the RPMset for that. Until we release RC2 RPMs, could you please run the following commands : export PERLVER=`perl -e 'printf "%vd\n", $^V'` echo "/usr/lib/perl5/$PERLVER/i386-linux-thread-multi/CORE" > /etc/ld.so.conf.d/perl.conf ldconfig Then createlang plperl test will work. - -HTH Regards, - -- Devrim GUNDUZ devrim~gunduz.org devrim.gunduz~linux.org.tr http://www.tdmsoft.com http://www.gunduz.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBwxzVtl86P3SPfQ4RAoO4AKC4UpnTXEKrXuRKlovj2LTS7rYlagCdGzDC tVt/5jzH7ZjqUwatH+HC4Tc= =vMcg -----END PGP SIGNATURE-----
Hello, I think I got it installed. I did have have libperl.so but for some reason it wasn't being picked up by ld.so.conf. So I: ldconfig /usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so Then I rebuilt the postgresql srpm. And I was able to do: createlang plperl test And it worked. Thanks to everyone that replied. Robert Boone