UnsatisfiedLinkError: /tmp/snappy-1.1.4-libsnappyjava.so Error loading shared library ld-linux-x86-64.so.2: No such file or directory

后端 未结 5 899
天命终不由人
天命终不由人 2020-12-09 02:51

I am trying to run a Kafka Streams application in kubernetes. When I launch the pod I get the following exception:

Exception in thread \"streams-pipe-e19c2d9         


        
5条回答
  •  孤街浪徒
    2020-12-09 03:39

    In my case, install the missing libc6-compat didn't work. Application still throw java.lang.UnsatisfiedLinkError.

    Then I find in the docker, /lib64/ld-linux-x86-64.so.2 exist and is a link to /lib/libc.musl-x86_64.so.1, but /lib only contains ld-musl-x86_64.so.1, not ld-linux-x86-64.so.2.

    So I add a file named ld-linux-x86-64.so.2 linked to ld-musl-x86_64.so.1 in /lib dir and solve the problem.

    Dockerfile I use:

    FROM openjdk:8-jre-alpine
    COPY entrypoint.sh /entrypoint.sh
    RUN apk update && \
      apk add --no-cache libc6-compat && \
      ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2 && \
      mkdir /app && \
      chmod a+x /entrypoint.sh
    COPY build/libs/*.jar /app
    ENTRYPOINT ["/entrypoint.sh"]
    

    In conclusion:

    RUN apk update && apk add --no-cache libc6-compat
    ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
    

提交回复
热议问题