ForgeRock Identity Platform
Does not apply to Identity Cloud

Could not load library error when trying to run Amster after installing it for AM 7.x

Last updated Jan 18, 2023

The purpose of this article is to provide assistance if you encounter an "Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library" error when trying to run Amster for the first time after installing it.


An error similar to the following is shown when you run the amster command:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi64-7.1.0 - 2021-May-10 11:06:52 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib], no jansi-7.1.0 - 2021-May-10 11:06:52 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib], no jansi in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib], /tmp/libjansi-64-7-6151295137849897833.1: /tmp/libjansi-64-7-6151295137849897833.1: failed to map segment from shared object: Operation not permitted] at org.fusesource.hawtjni.runtime.Library.doLoad( at org.fusesource.hawtjni.runtime.Library.load( at org.fusesource.jansi.internal.CLibrary.<clinit>( at org.fusesource.jansi.AnsiConsole.wrapOutputStream( at org.fusesource.jansi.AnsiConsole.<clinit>( at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName( at org.codehaus.groovy.runtime.callsite.CallSiteArray.lambda$createCallStaticSite$2( at java.base/ Method) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite( ...

Recent Changes

Installed Amster for AM 7.x.


Amster 7 and later uses the Jansi library to format the command line output, and this library is packaged in the amster-7.x.x.jar file.

During startup, Amster extracts the shared Jansi library to the /tmp directory and then loads it from there. If the user who runs Amster does not have read-write access to the /tmp directory, startup fails with this error message. This permissions issue often occurs because of additional security hardening. For example, you are using SELinux, the /tmp directory has been mounted using the NOEXEC flag or, in a containerized environment, the /tmp directory has been mounted using a configmap with stricter permissions.


This issue can be resolved using one of the following options depending on whether you can change the permissions:

  • Give the user account that runs Amster read-write access to the /tmp directory.
  • Create a new /temp directory for Amster to use as follows:
    1. Create a directory called /temp under the main Amster directory, for example:$ mkdir /path/to/amster/temp
    2. Add the following JVM property to the amster script (located in the /path/to/amster directory) property should be added to the $JAVA_HOME line so it looks similar to this:$JAVA_HOME/bin/java $debug -Djava.awt.headless=true -jar ${DIR}/amster-*.jar $*

See Also

Amster User guide

Related Training


Related Issue Tracker IDs


Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.