could not open extension control file "/usr/share/postgresql/9.1/extension/plpythonu.control": No such file or directory

在使用createlang 安装plpythonu的时候出现如下错误:
could not open extension control file "/usr/share/postgresql/9.1/extension/plpythonu.control": No such file or directory
主要原因是安装postgresql的时候没有使用--with-python选项编译好PL/Python
对于已经安装好的postgresql可以通过以下方式解决缺少依赖包的问题:
sudo apt-get install postgresql-plpython
安装好postgresql-plpython之后就可以安装pypythonu了
createlang -h 127.0.0.1 -p 5432 -U postgres -W plpythonu yourdbname



原文地址:https://www.cnblogs.com/Jerryshome/p/3141822.html