Confluence Server 6.13 or later fails with library not loaded error when starting up on MacOS
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Problem
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.
1
2
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
...
Cause
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
Workaround
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
1
2
$ 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
Was this helpful?