Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgres plpythonu extension doesn't exist in /usr/pgsql-9.3/share/extension

Tags:

postgresql

When I try to enable plythonu by using

CREATE EXTENSION plpythonu

I get error

ERROR:  could not open extension control file "/usr/pgsql-9.3/share/extension/plpythonu.control": No such file or directory

The extension folder has no file with that name.

Is there a download link? How can I add plpythonu?

like image 576
Mr. Zen Avatar asked Jul 08 '14 14:07

Mr. Zen


1 Answers

PL/Python isn't installed. In most Linux packages of PostgreSQL it's a separate package.

If you're using apt.postgresql.org (PGDG) packages on Debian/Ubuntu:

apt-get install postgresql-contrib-9.3 postgresql-plpython-9.3

If you're on Ubuntu or Debian with their stock PostgreSQL packages:

apt-get install postgresql-contrib postgresql-plpython

If you're on Fedora/CentOS/RhEL with PGDG packages from yum.postgresql.org:

yum install postgresql93-contrib postgresql93-plpython

If you're on Fedora/CentOS/RHEL with stock packages:

yum install postgresql-contrib postgresql-plpython

The contrib packages aren't strictly required, but you're likely to want them too.

like image 50
Craig Ringer Avatar answered Nov 01 '22 15:11

Craig Ringer