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

Sum*_*eek 11 python postgresql

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

could not access file "$libdir/plpython": No such file or directory
Run Code Online (Sandbox Code Playgroud)

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

$ createlang plpythonu <dbname> -U postgres
createlang: language installation failed: ERROR:  could not access file "$libdir/plpython": No such file or directory
Run Code Online (Sandbox Code Playgroud)

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

den*_*lin 5

sudo apt-get install postgresql-plpython-8.3
Run Code Online (Sandbox Code Playgroud)

或对于PostgreSQL 8.4:

sudo apt-get install postgresql-plpython-8.4
Run Code Online (Sandbox Code Playgroud)


小智 4

安装postgresql-plpython-8.3