Skip to content

Commit fd93fbb

Browse files
committed
Fix broken system symlinks for libpq in Dockerfile
1 parent b784a4d commit fd93fbb

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

circleci/images/exttester/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,14 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres
187187
COPY --from=dev-tools-collection /collect/ /
188188

189189
ARG PG_MAJOR
190+
# fix broken system symlinks for libpq
190191
RUN set -eux; \
191-
ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \
192-
/usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5; \
192+
cd /usr/lib/x86_64-linux-gnu; \
193+
# pick the one real libpq.so.5.* file:
194+
tgt=$(ls -1 libpq.so.5.* 2>/dev/null | head -n1) || exit 1; \
195+
ln -sf "${tgt}" libpq.so.5; \
196+
ln -sf "${tgt}" libpq.so; \
197+
# teach ld.so about it
193198
echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf; \
194199
ldconfig
195200

0 commit comments

Comments
 (0)