graalvm / container

GraalVM container images
Other
166 stars 37 forks source link

libfreetype.so.6: cannot open shared object file: No such file or directory #73

Closed WolfAURman closed 1 year ago

WolfAURman commented 1 year ago
java.lang.UnsatisfiedLinkError: /usr/lib64/graalvm/graalvm22-ce-java17/lib/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory

What could be the problem? I use docker container version 17, jdk package. Is it possible to fix it manually, already on the working container?

WolfAURman commented 1 year ago

I solved this problem by building a personal container with the addition of packages:

For debian:

FROM debian:11

ADD graalvm-ce-java17-linux-amd64-22.3.1.tar.gz /opt/
RUN ln -svf /opt/graalvm-ce-java17-22.3.1/bin/java /usr/bin/java
RUN apt-get update
RUN apt-get install apt-utils -y    --no-install-recommends
RUN apt-get install libfreetype6 -y  --no-install-recommends
RUN apt-get install fontconfig -y --no-install-recommends
RUN apt-get install fonts-dejavu -y --no-install-recommends

For RHEL and its forks:

FROM rockylinux:9.1

ADD graalvm-ce-java17-linux-amd64-22.3.1.tar.gz /opt/
RUN ln -svf /opt/graalvm-ce-java17-22.3.1/bin/java /usr/bin/java
RUN dnf install freetype -y
RUN dnf install fontconfig -y
RUN dnf install dejavu-sans-mono-fonts -y