如何为已安装的postgreSQL添加python支持?

时间:2010-08-25 05:14:42

标签: python postgresql

我在ubuntu机器上安装了postgreSQL版本8.3。这是通过apt get安装的。当我试图获取一个写有一些plsql函数的数据库转储时,我收到以下错误 -

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

当我尝试为特定数据库启用python支持时,我又遇到了另一个错误 -

$ createlang plpythonu <dbname> -U postgres
createlang: language installation failed: ERROR:  could not access file "$libdir/plpython": No such file or directory

有没有办法可以添加对python的支持而无需重新安装postgreSQL?

2 个答案:

答案 0 :(得分:4)

安装postgresql-plpython-8.3

答案 1 :(得分:4)

sudo apt-get install postgresql-plpython-8.3

或postgresql 8.4:

sudo apt-get install postgresql-plpython-8.4