Forum How do I...?

Install on Alpine Edge

rlanyi
Hello,

I'd like to install PrinceXML in a Docker container running Alpine. The issue is that on the download page the latest version is for Alpine 3.12 but I need it for Alpine Edge because I need PHP 7.4 support that is only available in the edge release.

Is there an easy way to install it?

Thanks!
mikeday
Could you try the Generic Linux package?
rlanyi
I've tried that with the default installation path [/usr/local] and the result is:

/prince-13.6-linux-generic-x86_64 # ./install.sh 
Prince 13.6

Install directory
    This is the directory in which Prince 13.6 will be installed.
    Press Enter to accept the default directory or enter an alternative.
    [/usr/local]:  

Installing Prince 13.6...
Creating directories...
Installing files...

Installation complete.
    Thank you for choosing Prince 13.6, we hope you find it useful.
    Please visit http://www.princexml.com for updates and development news.

/prince-13.6-linux-generic-x86_64 # prince --version
/usr/local/bin/prince: exec: line 3: /usr/local/lib/prince/bin/prince: not found

mikeday
Could you run ldd on the binary at /usr/local/lib/prince/bin/prince to see which libraries are missing?
rlanyi
This is on alpine:edge and with Prince for Alpine 3.12.

/prince-13.6-alpine3.12-x86_64 # ldd /usr/local/lib/prince/bin/prince
	/lib/ld-musl-x86_64.so.1 (0x7fc51b8ff000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x7fc51a236000)
Error loading shared library libpixman-1.so.0: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
Error loading shared library libtiff.so.5: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
Error loading shared library libgif.so.7: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7fc51a206000)
Error loading shared library liblcms2.so.2: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x7fc51a18c000)
	libcurl.so.4 => /usr/lib/libcurl.so.4 (0x7fc51a116000)
	libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7fc519e95000)
	libz.so.1 => /lib/libz.so.1 (0x7fc519e7b000)
Error loading shared library libfontconfig.so.1: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7fc519dc7000)
Error loading shared library libgomp.so.1: No such file or directory (needed by /usr/local/lib/prince/bin/prince)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fc51b8ff000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x7fc519da4000)
	libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x7fc519d7c000)
	libssl.so.1.1 => /lib/libssl.so.1.1 (0x7fc519cfb000)
	libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x7fc519cee000)
	libbz2.so.1 => /usr/lib/libbz2.so.1 (0x7fc519cdf000)
	libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x7fc519cbc000)
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_contains_point: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFReadRGBAImage: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsBuildGamma: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_format_supported_destination: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_remove: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsGetProfileVersion: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcObjectSetCreate: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcPatternDestroy: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_freeze: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_create_linear_gradient: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_stride: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_thaw: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsDoTransform: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_fill: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_subtract: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_data: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_destroy: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_create_solid_fill: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_init_rect: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsGetProfileInfoASCII: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_composite32: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsD50_xyY: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsFreeToneCurve: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_composite_glyphs: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_lookup: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_version_string: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_format: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsSetPCS: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcPatternGetInteger: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFGetField: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_unref: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_width: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsCreateContext: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: DGifSlurp: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsPipelineAlloc: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsReverseToneCurveEx: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcPatternCreate: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsCreateLab2ProfileTHR: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_init_rects: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsWriteTag: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: GOMP_barrier: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_create_radial_gradient: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsCreateRGBProfileTHR: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsOpenProfileFromFileTHR: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsPipelineFree: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_get_mask_format: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_blt: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFClientOpen: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsSetProfileVersion: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_set_destroy_function: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsSetColorSpace: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsStageAllocToneCurves: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_component_alpha: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_contains_rectangle: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_set_transform: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: GOMP_parallel: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: omp_set_num_threads: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFSetWarningHandler: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_fini: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_set_repeat: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcPatternAddString: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsSaveProfileToMem: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsOpenProfileFromMemTHR: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsDeleteContext: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsDeleteTransform: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsCreateTransformTHR: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsGetDeviceClass: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsGetEncodedCMMversion: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_ref: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFSetErrorHandler: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsSetHeaderRenderingIntent: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_rasterize_trapezoid: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: DGifCloseFile: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsSetDeviceClass: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_init: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsChannelsOf: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_copy: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_translate: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_n_rects: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_depth: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_insert: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsBuildTabulatedToneCurveFloat: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_rectangles: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcObjectSetDestroy: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_not_empty: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_intersect: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_set_component_alpha: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_set_filter: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFClose: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcInit: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_create_bits: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: TIFFReadScanline: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_extents: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsCloseProfile: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_glyph_cache_create: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: omp_get_thread_num: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_set_clip_region32: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_add_triangles: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_union: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_region32_equal: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcPatternGetString: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsPipelineInsertStage: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: omp_get_num_threads: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcObjectSetAdd: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsIsToneCurveMonotonic: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcFontList: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: DGifOpen: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: FcFontSetDestroy: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsGetColorSpace: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_transform_point_3d: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: cmsCreateProfilePlaceholder: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_composite_glyphs_no_mask: symbol not found
Error relocating /usr/local/lib/prince/bin/prince: pixman_image_get_height: symbol not found
wangp
The Prince package for Alpine Linux 3.12 should work on Alpine Edge after you install the required libraries:
apk add libxml2 pixman tiff giflib libpng lcms2 fontconfig libgomp

However, there is no guarantee this will continue to work as "edge" may change library versions in the future.

The linux-generic package requires glibc, so will not work on Alpine Linux which uses musl libc.
rlanyi
Thanks, adding these packages has solved the issue.