Caused by: java.lang.UnsatisfiedLinkError: Could not find jnind4jcpu

I am getting this error on Linux operating systems. Windows works without any problems.

Caused by: java.lang.UnsatisfiedLinkError: no jnind4jcpu in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2423) ~[?:?]
        at java.lang.Runtime.loadLibrary0(Runtime.java:808) ~[?:?]
        at java.lang.System.loadLibrary(System.java:1893) ~[?:?]
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1800) ~[?:?]
        at org.bytedeco.javacpp.Loader.load(Loader.java:1402) ~[?:?]
        at org.bytedeco.javacpp.Loader.load(Loader.java:1214) ~[?:?]
        at org.bytedeco.javacpp.Loader.load(Loader.java:1190) ~[?:?]
        at org.nd4j.linalg.cpu.nativecpu.bindings.Nd4jCpu.<clinit>(Nd4jCpu.java:14) ~[?:?]
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:466) ~[?:?]
        at org.nd4j.common.config.ND4JClassLoading.loadClassByName(ND4JClassLoading.java:62) ~[?:?]
        at org.nd4j.common.config.ND4JClassLoading.loadClassByName(ND4JClassLoading.java:56) ~[?:?]
        at org.nd4j.nativeblas.NativeOpsHolder.<init>(NativeOpsHolder.java:88) ~[?:?]
        at org.nd4j.nativeblas.NativeOpsHolder.<clinit>(NativeOpsHolder.java:37) ~[?:?]
        ... 39 more
Caused by: java.lang.UnsatisfiedLinkError: Could not find jnind4jcpu in class, module, and library paths.
        at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1767) ~[?:?]
        at org.bytedeco.javacpp.Loader.load(Loader.java:1402) ~[?:?]
        at org.bytedeco.javacpp.Loader.load(Loader.java:1214) ~[?:?]
        at org.bytedeco.javacpp.Loader.load(Loader.java:1190) ~[?:?]
        at org.nd4j.linalg.cpu.nativecpu.bindings.Nd4jCpu.<clinit>(Nd4jCpu.java:14) ~[?:?]
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:466) ~[?:?]
        at org.nd4j.common.config.ND4JClassLoading.loadClassByName(ND4JClassLoading.java:62) ~[?:?]
        at org.nd4j.common.config.ND4JClassLoading.loadClassByName(ND4JClassLoading.java:56) ~[?:?]
        at org.nd4j.nativeblas.NativeOpsHolder.<init>(NativeOpsHolder.java:88) ~[?:?]
        at org.nd4j.nativeblas.NativeOpsHolder.<clinit>(NativeOpsHolder.java:37) ~[?:?]
        ... 39 more

I really don`t understand how to solve it. I have currently tried importing EVERYTHING, I quite literally have a 1.7GB jar file at this point with these dependencies:

<properties>
        <dl4j-master.version>1.0.0-M2</dl4j-master.version>
        <!-- Change the nd4j.backend property to nd4j-cuda-X-platform to use CUDA GPUs -->
        <!-- <nd4j.backend>nd4j-cuda-10.2-platform</nd4j.backend> -->
        <nd4j.backend>nd4j-native-platform</nd4j.backend>
        <java.version>1.8</java.version>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven.minimum.version>3.3.1</maven.minimum.version>
        <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
        <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
        <jcommon.version>1.0.23</jcommon.version>
        <jfreechart.version>1.0.13</jfreechart.version>
        <logback.version>1.1.7</logback.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit.version>5.8.0-M1</junit.version>
        <javacv.version>1.5.5</javacv.version>

    </properties>

<dependencies>
		<dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>${nd4j.backend}</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>


        <dependency>
            <groupId>org.datavec</groupId>
            <artifactId>datavec-api</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
        <dependency>
            <groupId>org.datavec</groupId>
            <artifactId>datavec-data-image</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
        <dependency>
            <groupId>org.datavec</groupId>
            <artifactId>datavec-local</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-datasets</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-core</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>

        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>resources</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>

        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-ui</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-zoo</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
        <!-- ParallelWrapper & ParallelInference live here -->
        <dependency>
            <groupId>org.deeplearning4j</groupId>
            <artifactId>deeplearning4j-parallel-wrapper</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>

        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacv-platform</artifactId>
            <version>${javacv.version}</version>
        </dependency>

	</dependencies>

What is going on here and why is this going wrong?

@Joehot200 you’re missing the actual root cause. This always usually comes down to running on an older OS.

To verify the problem though, please set the system property:
org.bytedeco.javacpp.logger.debug to true.

You can do this by running on the command line with -Dorg.bytedeco.logger.debug=true
or in java with:

System.setProperty("org.bytedeco.javacpp.logger.debug","true");

What you’ll probably find running that is your OS being old. If that’s the case (you’re probably running on an old centos or something) then use the compat classifier.

<dependency>
  <groupId>org.nd4j</groupId>
  <artifactId>nd4j-native</artifactId>
  <version>1.0.0-M2</version>
</dependency>
<dependency>
  <groupId>org.nd4j</groupId>
  <artifactId>nd4j-native</artifactId>
  <version>1.0.0-M2</version>
 <classifier>linux-x86_64-compat</classifier>
</dependency>

You may also need the relevant openblas dependencies if you are not using nd4j-native-platform (we usually do this for you)
In that case add:

<dependency>
  <groupId>org.bytedeco</groupId>
  <artifactId>openblas</artifactId>
  <version>0.3.19-1.5.7</version>
</dependency>
<dependency>
  <groupId>org.bytedeco</groupId>
  <artifactId>openblas</artifactId>
  <version>0.3.19-1.5.7</version>
<classifier>linux-x86_64</classifier>
</dependency>

Note this is a common problem for any library not just ours. Any library that fails to load (especially with javacpp) usually has linker issues related to glibc. Libraries built with newer glibcs will always
error out like that on newer systems.

We build our libraries on reasonably old (ubuntu 18) OSes but for people who need older systems than that we provide a compat classifier. This allows the users to make the trade off of compatibility vs newer features and more performance.