Create language PLPERL error

Started by Shakil Shaikhover 16 years ago8 messagesgeneral
Jump to latest
#1Shakil Shaikh
sshaikh@hotmail.com

Hi all,

Running Postgres 8.4 on Ubuntu 9.04, installed via the clickonce installer.
I'm getting a curious error when trying to create/add support for plperl to
any database:

ERROR: could not load library
"/opt/PostgreSQL/8.4/lib/postgresql/plperl.so":
/opt/PostgreSQL/8.4/lib/postgresql/plperl.so: undefined symbol:
Perl_Tcurpad_ptr

I previously got a libperl.so not found error which I thought I alleviated
by installing dev-perl via Synaptic.

Any ideas on how to figure out what's going on?

Shak

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Shakil Shaikh (#1)
Re: Create language PLPERL error

"Shakil Shaikh" <sshaikh@hotmail.com> writes:

Running Postgres 8.4 on Ubuntu 9.04, installed via the clickonce installer.
I'm getting a curious error when trying to create/add support for plperl to
any database:

ERROR: could not load library
"/opt/PostgreSQL/8.4/lib/postgresql/plperl.so":
/opt/PostgreSQL/8.4/lib/postgresql/plperl.so: undefined symbol:
Perl_Tcurpad_ptr

You've apparently got a version of libperl.so that is not compatible
with the one that your Postgres was built against. There are lots of
compile-time options for Perl that affect this, so it's not exactly
a surprising situation. The easiest fix is to be sure you get your
postgres and perl packages from the same place. Alternatively, if
you really want to use a specific version of perl, recompile Postgres
from source against that perl.

I previously got a libperl.so not found error which I thought I alleviated
by installing dev-perl via Synaptic.

Adding yet other versions of perl into the mix is definitely not the
way to get out of this kind of trouble ;-)

regards, tom lane

#3Shakil Shaikh
sshaikh@hotmail.com
In reply to: Tom Lane (#2)
Re: Create language PLPERL error

From: "Tom Lane" <tgl@sss.pgh.pa.us>

You've apparently got a version of libperl.so that is not compatible
with the one that your Postgres was built against. There are lots of
compile-time options for Perl that affect this, so it's not exactly
a surprising situation. The easiest fix is to be sure you get your
postgres and perl packages from the same place. Alternatively, if
you really want to use a specific version of perl, recompile Postgres
from source against that perl.

Thanks, I see. Some further questions then:

Since 8.4 isn't on Synaptic, would that mean that I'm limited to running
8.3.7?

Is there any way of finding which version of libperl.so Postgres is
expecting and so obtain that instead?

I previously got a libperl.so not found error which I thought I
alleviated
by installing dev-perl via Synaptic.

Adding yet other versions of perl into the mix is definitely not the
way to get out of this kind of trouble ;-)

But no version of libperl.so was present so I had to get *something* (even
though it was the wrong one!). Unless you mean I can do CREATE LANGUAGE
without libperl-dev (sorry, I got the name wrong in my OP!)?

Shak

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Shakil Shaikh (#1)
Re: Create language PLPERL error

Shakil Shaikh wrote:

Hi all,

Running Postgres 8.4 on Ubuntu 9.04, installed via the clickonce
installer.

Remove that, and install them from Martin Pitt's repository:
https://launchpad.net/~pitti/+archive/postgresql

The one-click installer does not integrate well with the platform.
Avoid using them.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#5Shakil Shaikh
sshaikh@hotmail.com
In reply to: Alvaro Herrera (#4)
Re: Create language PLPERL error

From: "Alvaro Herrera" <alvherre@commandprompt.com>

Remove that, and install them from Martin Pitt's repository:
https://launchpad.net/~pitti/+archive/postgresql

The one-click installer does not integrate well with the platform.
Avoid using them.

Hi, thanks for the tip.

I tried installing this but am now getting the following error when trying
to install plperl:

ERROR: could not access file "$libdir/plperl": No such file or directory

Apparently this means that the version of Postgresql I have wasn't compiled
with support for plperl. How would I find this out, and hopefully fix it?

Shak

#6Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Shakil Shaikh (#5)
Re: Create language PLPERL error

Shakil Shaikh wrote:

I tried installing this but am now getting the following error when
trying to install plperl:

ERROR: could not access file "$libdir/plperl": No such file or directory

Apparently this means that the version of Postgresql I have wasn't
compiled with support for plperl. How would I find this out, and
hopefully fix it?

Did you install the postgresql-plperl package?

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#7Shakil Shaikh
sshaikh@hotmail.com
In reply to: Alvaro Herrera (#6)
Re: Create language PLPERL error

--------------------------------------------------
From: "Alvaro Herrera" <alvherre@commandprompt.com>

Shakil Shaikh wrote:

ERROR: could not access file "$libdir/plperl": No such file or directory

Apparently this means that the version of Postgresql I have wasn't
compiled with support for plperl. How would I find this out, and
hopefully fix it?

Did you install the postgresql-plperl package?

I only see the 8.3.7 version in Synaptic. Will getting that break anything?
It seems to depend on Postgre-8.3 and client 8.3.

Shak

#8Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Shakil Shaikh (#7)
Re: Create language PLPERL error

Shakil Shaikh wrote:

--------------------------------------------------
From: "Alvaro Herrera" <alvherre@commandprompt.com>

Shakil Shaikh wrote:

ERROR: could not access file "$libdir/plperl": No such file or directory

Apparently this means that the version of Postgresql I have wasn't
compiled with support for plperl. How would I find this out, and
hopefully fix it?

Did you install the postgresql-plperl package?

I only see the 8.3.7 version in Synaptic. Will getting that break
anything? It seems to depend on Postgre-8.3 and client 8.3.

You need to get the 8.4 package. It should be in Martin Pitt's
repository too.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support