Package: openjdk-21-jre
Version: 21
When running a Java 21 application that uses fonts on trixie (13), I get
the message:
java.lang.UnsatisfiedLinkError:
/usr/lib/jvm/java-21-openjdk-amd64/lib/libfontmanager.so:
libharfbuzz.so.0: cannot open shared object file: No such file or directory
Manually installing libharfbuzz-bin solves the issue for me.
I attach the Dockerfile of the container image that I use to run the
application as an example. (I.E. with the manual fix for my situation)
Greetings.. Mark
--
Mark de Does, Magdalenastraat 6, 3512 NH Utrecht, the Netherlands,
http://maps.google.nl/?q=52.08692,5.1271,
e: m...@mdedoes.xs4all.nl t: 030 2314150
#
# Create a docker image that:
# - Performs the initial import and configuration of the OpenStreetMap database
# For improvements.. See
https://gist.github.com/StevenACoffman/41fee08e8782b411a4a26b9700ad7af5
# and https://github.com/Yelp/dumb-init
#
FROM debian:trixie-slim
ENV DEBIAN_FRONTEND=noninteractive
# Activate apt system
RUN apt-get update && \
apt-get upgrade -q -y && \
apt-get install -q -y --no-install-recommends apt-utils
# We only need java jre and some fonts
# Why not explicitly install jre 17? See
https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/2012191
# Trust that the default is openjdk-17-jre-headless
RUN apt-get install -q -y --no-install-recommends \
default-jre-headless \
dumb-init \
fonts-dejavu \
fonts-freefont-ttf \
fonts-liberation \
fonts-liberation2 \
fonts-urw-base35 \
fontconfig \
libharfbuzz-bin
# Add group and user. The numerical IDs match those in the host
(prepare-host.sh)
RUN groupadd --gid 204 tringamaps && \
useradd tringamaps --uid 203 --gid tringamaps && \
mkdir -p /home/tringamaps && \
chown tringamaps:tringamaps /home/tringamaps && \
chmod 755 /home/tringamaps
WORKDIR /home/tringamaps
COPY --chown=tringamaps:tringamaps --chmod=644 mapfeatures.jar mapfeatures.jar
COPY --chown=tringamaps:tringamaps --chmod=755 serve-in-docker.sh
serve-in-docker.sh
USER tringamaps
# Beter do this now, than wait for the equivalent while drawing the first map
RUN fc-cache -f
# Run spring boot application
ENTRYPOINT [ "/usr/bin/dumb-init", "--", "sh", "serve-in-docker.sh" ]