Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load native library:jansi-2.4.0-d705f3ccea969984-libjansi.so #877

Open
nick-ling opened this issue Aug 14, 2023 · 2 comments
Open

Comments

@nick-ling
Copy link

There is a problem with the maven configuration environment in Synology

limbo@Limbo-NAS:/opt$ java -version

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

limbo@Limbo-NAS:/opt$ mvn -v

Failed to load native library:jansi-2.4.0-320a2697b8944d1c-libjansi.so. The native library file at /tmp/jansi-2.4.0-320a2697b8944d1c-libjansi.so is not executable, make sure that the directory is mounted on a partition without the noexec flag, or set the jansi.tmpdir system property to point to a proper location.  osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/jansi-2.4.0-320a2697b8944d1c-libjansi.so: /tmp/jansi-2.4.0-320a2697b8944d1c-libjansi.so: failed to map segment from shared object
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /opt/maven38
Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: /volume1/container/common/opt/config/jdk8/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.302+", arch: "amd64", family: "unix"

limbo@Limbo-NAS:/opt$ 

Upgrade the jdk of higher version

limbo@Limbo-NAS:/volume1/container/common/opt/config$ sudo vim /etc/profile 
limbo@Limbo-NAS:/volume1/container/common/opt/config$ source /etc/profile 
limbo@Limbo-NAS:/volume1/container/common/opt/config$ java -version

java version "17.0.8" 2023-07-18 LTS
Java(TM) SE Runtime Environment (build 17.0.8+9-LTS-211)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.8+9-LTS-211, mixed mode, sharing)

limbo@Limbo-NAS:/volume1/container/common/opt/config$ mvn -v

Failed to load native library:jansi-2.4.0-51613297cfd7b049-libjansi.so. The native library file at /tmp/jansi-2.4.0-51613297cfd7b049-libjansi.so is not executable, make sure that the directory is mounted on a partition without the noexec flag, or set the jansi.tmpdir system property to point to a proper location.  osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/jansi-2.4.0-51613297cfd7b049-libjansi.so: /tmp/jansi-2.4.0-51613297cfd7b049-libjansi.so: failed to map segment from shared object
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /opt/maven38
Java version: 17.0.8, vendor: Oracle Corporation, runtime: /volume1/container/common/opt/config/jdk17
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.302+", arch: "amd64", family: "unix"

limbo@Limbo-NAS:/volume1/container/common/opt/config$ 

The problem still exists!

How should I solve the problem?

@gnodet
Copy link
Contributor

gnodet commented Aug 22, 2023

@nick-ling please check the message The native library file at /tmp/jansi-2.4.0-51613297cfd7b049-libjansi.so is not executable, make sure that the directory is mounted on a partition without the noexec flag, or set the jansi.tmpdir system property to point to a proper location. osinfo: Linux/x86_64

@lmofor
Copy link

lmofor commented Dec 21, 2023

Add this tag to your mvn command : -Djdk.lang.Process.launchMechanism=vfork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants