Forum How do I...?

Prince on alpine image depends on outdated version of libavif

Saybrian
I'm trying to get the latest available version of Prince for alpine (https://www.princexml.com/download/prince-20221028-alpine3.16-x86_64.tar.gz) working on an alpine 3.17 base image (eclipse-temurin:17-alpine) but prince is outputting the following error:
Error loading shared library libavif.so.14: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
Error relocating /usr/local/lib/prince/bin/prince: avifDecoderCreate: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifRGBImagePixelSize: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifRGBImageSetDefaults: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifDecoderDestroy: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifDecoderNextImage: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifDecoderSetIOMemory: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifImageYUVToRGB: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifDecoderParse: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: avifVersion: symbol not found

A look at /usr/lib shows that libavif.so.15 has been installed (rather than libavif.so.14) since libavif.so.14 is from an outdated package version (0.10.1) rather than the latest version (0.11.1) and my attempts to pin it to version 0.10.1 result in the error:

ERROR: unable to select packages:
libavif-apps-0.11.1-r0:
breaks: world[libavif-apps=0.10.1]

the relevant section of my dockerfile which installs packages and prince:
RUN apk add --no-cache libxml2 pixman tiff giflib libpng libcrypto1.1 lcms2 libjpeg-turbo freetype libgomp libavif aom libcurl && \
wget -O /tmp/prince-20221028-alpine3.16-x86_64.tar.gz https://www.princexml.com/download/prince-20221028-alpine3.16-x86_64.tar.gz && \
tar -xf /tmp/prince-20221028-alpine3.16-x86_64.tar.gz -C /tmp && \
cd /tmp/prince-20221028-alpine3.16-x86_64 && \
./install.sh && \
rm -rf /tmp/prince-20221028-alpine3.16-x86_64 && \
rm /tmp/prince-20221028-alpine3.16-x86_64.tar.gz

mikeday
We've now uploaded a Prince 15 package for Alpine 3.17, hopefully this will solve the problem!

https://www.princexml.com/download/
Saybrian
that did the trick - thank you so much @mikeday