libpython - cannot open shared object file

From: Tom Wilcox <hungrytom(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: libpython - cannot open shared object file
Date: 2010-06-16 13:58:08
Message-ID: AANLkTiluGYuDr9P1KjRu2LNwS-N0Lf3u5zdnC4mpmyOX@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Hi,

I have got PostgreSQL 8.4 up and running on my Ubuntu Server 64-bit OS, but
I am having difficulty with the PL/Python functions from my database. In
particular, I am running this:

-------------------------------------------------------
drop language plpythonu cascade;
create language plpythonu;

-- Utility
CREATE OR REPLACE FUNCTION min_float(a float, b float) RETURNS float AS $$
return min(a,b);
$$ LANGUAGE plpythonu;

SELECT min_float(1,2);

-------------------------------------------------------

And receiving this error message:

-------------------------------------------------------
NOTICE: drop cascades to function min_float(double precision,double
precision)

ERROR: could not load library
"/opt/PostgreSQL/8.4/lib/postgresql/plpython.so": libpython2.3.so.1.0:
cannot open shared object file: No such file or directory

********** Error **********

ERROR: could not load library
"/opt/PostgreSQL/8.4/lib/postgresql/plpython.so": libpython2.3.so.1.0:
cannot open shared object file: No such file or directory
SQL state: 58P01
-------------------------------------------------------

The strange thing is that I have successfully created plpythonu language and
the PLPythonu function(s). I was originally having difficulty getting
PL/Python to install and it was throwing a similar error. However, this
everntually went away once I added the PostgreSQL root install dir to the
PATH variable (in my .bashrc and .bash_profile). I have both Python26 and
Python31 installed (both came with ubuntu I believe).

I am not sure that I have put my PATH and LD_LIBRARY_PATH settings into the
correct .bash_profile and .bashrc files so that PgAdmin3 and psql (being
opened by other users) will have the correct settings.

Any ideas/help much appreciated?

Thanks,
Tom

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Wilcox 2010-06-16 14:02:43 Re: libpython - cannot open shared object file
Previous Message Dimitri Fontaine 2010-06-16 13:34:32 Re: Monitoring activities of PostgreSQL

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Wilcox 2010-06-16 14:02:43 Re: libpython - cannot open shared object file
Previous Message Bruce Momjian 2010-06-15 19:49:28 Re: Windows environment