0

正如在这个问题中所问的那样,我尝试将 plpython3 扩展添加到我的 timescaledb/postgres(基于 linux alpine)图像中。

不幸的是,接受的答案似乎不再起作用。

我用以下代码更新了 dockerfile,但没有任何运气:

RUN apk update \
&& apk add --no-cache --virtual .build-deps build-base gcc postgresql-plpython3 \
&& ln -s /usr/lib/postgresql/plpython3.so /usr/local/lib/postgresql/plpython3.so \
&& ln -s /usr/share/postgresql/extension/plpython3u.control /usr/local/share/postgresql/extension/plpython3u.control \
&& ln -s /usr/share/postgresql/extension/plpython3u--1.0.sql /usr/local/share/postgresql/extension/plpython3u--1.0.sql \
&& ln -s /usr/share/postgresql/extension/plpython3u--unpackaged--1.0.sql /usr/local/share/postgresql/extension/plpython3u--unpackaged--1.0.sql

当我运行命令时,CREATE EXTENSION plpython3u; 我收到以下错误:

Error in query (7): ERROR: could not load library "/usr/local/lib/postgresql/plpython3.so": Error relocating /usr/local/lib/postgresql/plpython3.so: pg_vsnprintf: symbol not found

关于如何解决这个问题的任何想法?

这是用于测试目的的完整 dockerfile:

FROM timescale/timescaledb:1.7.5-pg11

# Monitoring tools
RUN apk update \
    && apk add --no-cache --virtual .build-deps build-base gcc postgresql-plpython3 \
    && ln -s /usr/lib/postgresql/plpython3.so /usr/local/lib/postgresql/plpython3.so \
    && ln -s /usr/share/postgresql/extension/plpython3u.control /usr/local/share/postgresql/extension/plpython3u.control \
    && ln -s /usr/share/postgresql/extension/plpython3u--1.0.sql /usr/local/share/postgresql/extension/plpython3u--1.0.sql \
    && ln -s /usr/share/postgresql/extension/plpython3u--unpackaged--1.0.sql /usr/local/share/postgresql/extension/plpython3u--unpackaged--1.0.sql

CMD ["postgres"]

谢谢你的帮助

4

0 回答 0