-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
java.lang.UnsatisfiedLinkError: Could not find jniopenblas_nolapack in class, module, and library paths #2203
Comments
Please try again with version 1.5.10 |
Ill try and tell you. |
Please follow the instructions at https://github.com/bytedeco/javacpp-presets/wiki/Debugging-UnsatisfiedLinkError-on-Windows |
Thank you, I'll try. |
Did it work? If so, can you close this issue? |
I met the same problem and searching for help…… |
Can you provide us with an MRE? |
Just Call ‘Loader.load(opencv_java.class)’ under RHEL-7, Java 8 ,SpringBoot 2.7.2 |
with the dependency of javacv-platform 1.5.10, opencv-platform 1.5.10 , openblas-platform 1.5.10 |
It's worth noting that Spring Boot 2.7 no longer has OSS support. I just tried it with my current setup and everything worked as expected (Spring Boot 3.2.4, OpenJDK Temurin-17.0.10+7).
mkdir mre &&
cd mre &&
curl https://start.spring.io/starter.tgz -d dependencies=web,devtools -d type=maven-project | tar -xzvf -
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv-platform</artifactId>
<version>1.5.10</version>
</dependency>
package com.example.demo;
import org.bytedeco.javacpp.Loader;
import org.bytedeco.opencv.opencv_java;
import org.bytedeco.opencv.global.opencv_core;
import org.bytedeco.opencv.opencv_core.Mat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Demo {
@GetMapping
public String doGet(){
Loader.load(opencv_java.class);
Mat mat = Mat.eye(3, 3, opencv_core.CV_8UC1).asMat();
return "mat = " + mat.toString() + "\n";
}
}
curl localhost:8080
# mat = org.bytedeco.opencv.opencv_core.Mat[width=3,height=3,depth=8,channels=1] |
Did you do your test on red hat OS? My code can run well on windows10 but meet problem just on redhat7. |
I am not in a position to directly experiment with the suggested setup at this time. For anyone who is though, try creating a Dockerfile in the root directory of the MRE with the following content: FROM registry.access.redhat.com/ubi8/openjdk-17:1.19-1
WORKDIR /app
COPY . .
RUN mvn clean package -DskipTests
EXPOSE 8080
CMD ["java", "-jar", "target/app-0.0.1-SNAPSHOT.jar"] Then run: docker build -t demo:tag . &&
docker run --rm -it demo:tag |
I have a further problem. I found that problem is caused by that there is no |
I haven't used this library long enough to be able to troubleshoot problems, but I noticed it works out of the box in WSL (Ubuntu), but not in Git Bash (Windows), so I have a feeling strange errors might occur if you don't have GCC globally available in your environment when installing the dependencies. I haven't tested that theory though. |
I got the libstdc.6.0.28.so, which can support CXXABI_1_3_8. I would have a try to replace libstdc.6.0.19.so with this file. I hope it can work. |
anyone know how to fix this error?
The text was updated successfully, but these errors were encountered: