Problem with pl/perl in postgresql 8.0rc1

Started by Robert Booneover 21 years ago8 messagesgeneral
Jump to latest
#1Robert Boone
robert@rlb3.com

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

#2Andreas Kretschmer
andreas_kretschmer@despammed.com
In reply to: Robert Boone (#1)
Re: Problem with pl/perl in postgresql 8.0rc1

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� ;-)

#3Robert Boone
robert@rlb3.com
In reply to: Andreas Kretschmer (#2)
Re: Problem with pl/perl in postgresql 8.0rc1

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

Show quoted text

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

#4Robert Boone
robert@rlb3.com
In reply to: Robert Boone (#1)

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

#5Michael Fuhr
mike@fuhr.org
In reply to: Robert Boone (#3)
Re: Problem with pl/perl in postgresql 8.0rc1

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/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Boone (#1)
Re: Problem with pl/perl in postgresql 8.0rc1

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

#7Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Robert Boone (#1)
Re: Problem with pl/perl in postgresql 8.0rc1

-----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-----

#8David Fetter
david@fetter.org
In reply to: Robert Boone (#4)
Re: Problem with pl/perl in postgresql 8.0rc1

On Fri, Dec 17, 2004 at 10:52:07AM -0600, Robert Boone wrote:

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.

For now, do the following as root:

echo "/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" >>/etc/ld.so.conf.d/perl-i386.conf
ldconfig -v

Then your pl/perl(u) creation should Do The Right Thing.

This will be fixed in the next (S)RPMs :)

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!