$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4.30
GLIBCXX_3.4.30
Yet, when running another application on the same docker container:
org.postgresql.util.PSQLException: ERROR: could not load library "/usr/lib/postgresql/13/lib/llvmjit.so": /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libz3.so.4)
The llvvjit.so file is also present:
# ls /usr/lib/postgresql/13/lib/llvmjit.so
/usr/lib/postgresql/13/lib/llvmjit.so
I'm using the following Dockerfile:
FROM alpine
RUN apk upgrade --no-cache
RUN apk add libstdc++ postgresql-client leiningen
WORKDIR /ui-service
COPY . .
CMD ["lein", "ring", "server-headless", "3000"]
EXPOSE 3000
What am I missing for postgresql driver to load the shared library, or how can I further debug this?
Note that
/usr/lib/x86_64-linux-gnu/libstdc++.so.6and/lib/x86_64-linux-gnu/libstdc++.so.6are not the same.You likely have two versions of
libstdc++.so.6installed (never a good idea), one of them is older than the other.P.S. Using
stringis the wrong way to look for versions. Usereadelf -V /lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4.30instead.P.P.S. You tagged this question with the
glibctag, but this has nothing to do with GLIBC. See this answer.