You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error java.lang.UnsatisfiedLinkError with sbt run #118
Hi,
I try to run SysML-v2-API-Services on macOS 12.6.6.
When I launch "sbt run" I get this error
[error] java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/9f/28dwy9js4w1987vm3m44kzrm0000gn/T/jna--1748781543/jna16131927230977261316.tmp
I ran into this issue as well, running macOS 14.7. I managed to get around it by following this Stackoverflow thread. Basically, it boils down that the version of a JNA jar file that is provided in sbt 1.2.8 isn't compatible with the the M1 architecture (aarch64).
My sbt was installed with Homebrew, though I'm not sure if that will matter.
Navigate to ~/.sbt/boot/scala-2.12.7/org.scala-sbt/sbt/1.2.8 and move jna-4.5.0.jar to another location (just in case it doesn't work, you can revert it back)
Copy jna-5.8.0.jar into the 1.2.8 folder
Re-run sbt clean and sbt run
There wasn't much thought put into the versions, so maybe there is some nuance I'm missing that someone more knowledgable than me can correct, but getting jna-5.8.0.jar worked for me. I also arrived at this fix in a very roundabout way, so if this doesn't work, let me know and I can walk through the exact steps I performed.
Activity
EliZavalaGH commentedon Sep 25, 2024
I am currently having the same problem. Currently on macOS 14.2.1. I navigated into that folder and that last .tmp file is never there.
Sbt was installed with SDKMAN as well.
kewgt commentedon Nov 15, 2024
I ran into this issue as well, running macOS 14.7. I managed to get around it by following this Stackoverflow thread. Basically, it boils down that the version of a JNA jar file that is provided in sbt 1.2.8 isn't compatible with the the M1 architecture (
aarch64).My sbt was installed with Homebrew, though I'm not sure if that will matter.
Anyway, this should fix the problem:
jna-5.8.0.jar.~/.sbt/boot/scala-2.12.7/org.scala-sbt/sbt/1.2.8and movejna-4.5.0.jarto another location (just in case it doesn't work, you can revert it back)jna-5.8.0.jarinto the1.2.8foldersbt cleanandsbt runThere wasn't much thought put into the versions, so maybe there is some nuance I'm missing that someone more knowledgable than me can correct, but getting
jna-5.8.0.jarworked for me. I also arrived at this fix in a very roundabout way, so if this doesn't work, let me know and I can walk through the exact steps I performed.macroteck commentedon Mar 28, 2025
I was having the same issue, on MacOS, and this fixed it. Thank you for sharing 👍