Confluence Server 6.13 or later fails with library not loaded error when starting up on MacOS
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When starting Confluence Server or Data Center 6.13 or later with AdoptOpenJDK on MacOS for development or evaluation purposes, startup fails with the following error.
ERROR [atlassian.confluence.security.DefaultCaptchaManager] afterPropertiesSet Could not initialise CAPTCHA service. The most likely reason for this is that Java's graphics subsystem is not properly configured. Try startingConfluence's JVM with the -Djava.awt.headless=true option. /Library/Java/AdoptOpenJDK/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib: dlopen(/Library/Java/AdoptOpenJDK/jdk8u192-b12/Contents/Home/jre/lib/libfontmanager.dylib, 1): Library not loaded: @rpath/libfreetype.6.dylib
...
原因
There is a known issue where AdoptOpenJDK 8 has a broken dependency on libfreetype.6.dylib
in its libfontmanager.dylib
. Read more about the issue here: https://github.com/AdoptOpenJDK/openjdk-build/issues/202
回避策
As a workaround you can copy libfreetype.dylib.6
as libfreetype.6.dylib
and then change the install name of libfreetype.6.dylib
, using the following commands.
The steps have been tested on MacOS
$ cp <path to adoptopenjdk>/jdk8u181-b13/Contents/Home/jre/lib/libfreetype.dylib.6 <path to adoptopenjdk>/jdk8u181-b13/Contents/Home/jre/lib/libfreetype.6.dylib
$ install_name_tool -id @rpath/libfreetype.6.dylib <path to adoptopenjdk>/jdk8u181-b13/Contents/Home/jre/lib/libfreetype.6.dylib