我有postgres image:https://hub.docker.com/_/postgres我正在尝试使用以下命令创建python扩展:
create extension plpythonu但它失败了,并显示以下错误:
psql:/docker-entrypoint-initdb.d/init.sql:1: ERROR: could not open extension control file "/usr/share/postgresql/12/extension/plpythonu.control": No such file or directory在我的Dockerfile中,我尝试安装这个包:
FROM postgres
RUN apt-get update -y
RUN apt install postgresql-plpython3-12我得到了错误:
Unable to locate package postgresql-plpython3-12如何扩展postgresql才能使用python?
发布于 2020-09-26 10:34:35
我已经找到了一个解决方案,可以将plpython3安装到我的postgres容器中
FROM postgres
RUN apt-get update
RUN apt-get -y install python3 postgresql-plpython3-12
COPY pg-setup-scripts/init.sql /docker-entrypoint-initdb.d然后在入口点脚本中
create extension plpython3u;https://stackoverflow.com/questions/64045127
复制相似问题