anjae83
September 2, 2024, 5:52am
1
When I use Percona Server for MongoDB 6.0 from “tarball” I faced bottom error.
./mongod: error while loading shared libraries: libldap-2.5.so.0: cannot open shared object file: No such file or directory
I found libldap.2.5 is in Ubuntu only.
The latest version of openldap-devel is 2.4.46-18 in RHEL 8 and Rocky Linux 8. (2024/09/02)
I have to build source build to use tarball version in RHEL?
Hi @anjae83
Can you please share what tarball version/name you’re using?
Something new with this issue?
Please see my containerfile
FROM docker.io/redhat/ubi9-minimal:9.5
ENV PSMDB_VERSION="8.0.4-1" \
OS_VER="el9" \
FULL_PERCONA_VERSION="$PSMDB_VERSION.$OS_VER" \
GLIBC_TUNABLES="glibc.pthread.rseq=0"
RUN microdnf -y install openldap cyrus-sasl-gssapi cyrus-sasl findutils openssh libgcrypt numactl-libs procps-ng jq oniguruma policycoreutils tar gzip
RUN mkdir -p /tmp/pkg/cache/ ; \
mkdir -p /opt/mongodb ; \
cd /tmp/pkg/cache/ ; \
COMPONENTS=( \
"percona-server-mongodb-8.0.4-1-x86_64.jammy" \
"percona-mongodb-mongosh-2.3.2-x86_64" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
curl -SsLf "https://www.percona.com/downloads/percona-server-mongodb-8.0/percona-server-mongodb-8.0.4-1/binary/tarball/${COMPONENT}.tar.gz" -O ; \
fi ; \
tar -zxf "${COMPONENT}.tar.gz" -C /opt/mongodb --no-same-owner --strip-components=1 ; \
done
RUN microdnf -y update && \
microdnf -y upgrade && \
microdnf clean all && \
rm -rf /var/cache/dnf /var/cache/yum
RUN chmod g+rwX /opt
# ldap
RUN sed -i -e s/^MECHANISMS="pam"/MECHANISMS="ldap"/g /etc/sysconfig/saslauthd
RUN echo "pwcheck_method: saslauthd" > /etc/sasl2/mongodb.conf && \
echo "saslauthd_path: /var/run/saslauthd/mux" >> /etc/sasl2/mongodb.conf && \
echo "log_level: 5" >> /etc/sasl2/mongodb.conf && \
echo "mech_list: plain" >> /etc/sasl2/mongodb.conf
# RUN chmod 717 /var/run/saslauthd
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
ENV PATH="/opt/mongodb/bin:$PATH"
VOLUME ["/data/db"]
EXPOSE 27017
USER 1001
#ENTRYPOINT ["/entrypoint.sh"]
CMD ["mongod"]
While I run mongod, I get the very same communicate
I think it’s all caused by repo im attempting to install, this one is for debiany family os, is there any for rhel/el9?
https://downloads.percona.com/downloads/percona-server-mongodb-7.0/percona-server-mongodb-7.0.14-8/binary/tarball/percona-server-mongodb-7.0.14-8-x86_64.jammy.tar.gz
Nvm, I have finally find it, the proper one for rhel is ol9
https://downloads.percona.com/downloads/percona-server-mongodb-7.0/percona-server-mongodb-7.0.14-8/binary/tarball/percona-server-mongodb-7.0.14-8-x86_64.ol9.tar.gz
1 Like
You’re right, you need to use tarball suitable for your OS. As far as I can see, switching from jammy to ol9 tarball solves the issue, feel free to contact us if there are any additional questions.