Skip to content

Instantly share code, notes, and snippets.

@Sitin
Created April 20, 2016 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sitin/dd9a9481e2f2354da1ce8ee6d1087000 to your computer and use it in GitHub Desktop.
Save Sitin/dd9a9481e2f2354da1ce8ee6d1087000 to your computer and use it in GitHub Desktop.
deeplearning4j can't find libnd4j
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load the native library.
Error while loading native library "libnd4j-apple-x86_64" with base name "libnd4j"
Operating system name: Mac OS X
Architecture : x86_64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.NullPointerException: No resource found with name '/lib/liblibnd4j-apple-x86_64.dylib'
at org.nd4j.linalg.cpu.nativecpu.util.LibUtils.loadLibraryResource(LibUtils.java:149)
at org.nd4j.linalg.cpu.nativecpu.util.LibUtils.loadLibrary(LibUtils.java:83)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOps.<clinit>(NativeOps.java:17)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.<init>(NativeOpExecutioner.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:4708)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:4655)
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:146)
at org.canova.image.loader.ImageLoader.toINDArrayBGR(ImageLoader.java:420)
at org.canova.image.loader.ImageLoader.asRowVector(ImageLoader.java:119)
at org.canova.image.recordreader.BaseImageRecordReader.next(BaseImageRecordReader.java:212)
at org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:160)
at org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:313)
at org.neuromatriarchy.models.RBMModel$$anon$1.next(RBMModel.scala:190)
at org.neuromatriarchy.models.RBMModel$.main(RBMModel.scala:204)
at org.neuromatriarchy.models.RBMModel.main(RBMModel.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: no libnd4j-apple-x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.nd4j.linalg.cpu.nativecpu.util.LibUtils.loadLibrary(LibUtils.java:94)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOps.<clinit>(NativeOps.java:17)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.<init>(NativeOpExecutioner.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:4708)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:4655)
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:146)
at org.canova.image.loader.ImageLoader.toINDArrayBGR(ImageLoader.java:420)
at org.canova.image.loader.ImageLoader.asRowVector(ImageLoader.java:119)
at org.canova.image.recordreader.BaseImageRecordReader.next(BaseImageRecordReader.java:212)
at org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:160)
at org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:313)
at org.neuromatriarchy.models.RBMModel$$anon$1.next(RBMModel.scala:190)
at org.neuromatriarchy.models.RBMModel$.main(RBMModel.scala:204)
at org.neuromatriarchy.models.RBMModel.main(RBMModel.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
at org.nd4j.linalg.cpu.nativecpu.util.LibUtils.loadLibrary(LibUtils.java:128)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOps.<clinit>(NativeOps.java:17)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.<init>(NativeOpExecutioner.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:4708)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:4655)
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:146)
at org.canova.image.loader.ImageLoader.toINDArrayBGR(ImageLoader.java:420)
at org.canova.image.loader.ImageLoader.asRowVector(ImageLoader.java:119)
at org.canova.image.recordreader.BaseImageRecordReader.next(BaseImageRecordReader.java:212)
at org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:160)
at org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:313)
at org.neuromatriarchy.models.RBMModel$$anon$1.next(RBMModel.scala:190)
at org.neuromatriarchy.models.RBMModel$.main(RBMModel.scala:204)
at org.neuromatriarchy.models.RBMModel.main(RBMModel.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment