Re: libpython - cannot open shared object file

Поиск
Список
Период
Сортировка
От Tom Wilcox
Тема Re: libpython - cannot open shared object file
Дата
Msg-id AANLkTikv39hu9HVVHDlgjyFO7j0347Oncmwqu4DkETJH@mail.gmail.com
обсуждение исходный текст
Ответы Re: libpython - cannot open shared object file  (Tom Wilcox <hungrytom@gmail.com>)
Список pgsql-general
Interesting:

This works:

postgres@ubuntu64-bertha:~$ createlang -d cse plpythonu
Password:
postgres@ubuntu64-bertha:~$

But this doesn't:

postgres@ubuntu64-bertha:~$ psql -c "CREATE LANGUAGE plpythonu"
Password:
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

Any suggestions? Feels like I'm not with the correct env vars in psql but TBH Im getting somewhat dazed and confused from staring at this too long..

T


On 16 June 2010 14:58, Tom Wilcox <hungrytom@gmail.com> wrote:
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Re: Monitoring activities of PostgreSQL ("Everlasting" function execution)
Следующее
От: Filip Rembiałkowski
Дата:
Сообщение: Re: Monitoring activities of PostgreSQL