Skip to main content
added 589 characters in body
Source Link
jksoegaard
  • 79.6k
  • 4
  • 133
  • 204

The easiest way is simply to run the program. If the shared library is missing, you'll get an output similar to this:

dyld: Library not loaded: mylib.dylib
  Referenced from: /path/to/myprogram
  Reason: image not found
Abort trap: 6

You can also run the following command:

objdump -r --dylibs-used /path/to/myprogram

This will essentially give you the same output as the otool command, you've mentioned in your question (many years ago, Apple replaced the old toolchain with a llvm based one, so otool on recent macOS versions will just call objdump). The program lists the shared libraries that the program expects - you can then check manually if you actually have those files. I.e. is there a file in that path with that name, is it readable by your user and does it contain a valid dynamic library.

The easiest way is simply to run the program. If the shared library is missing, you'll get an output similar to this:

dyld: Library not loaded: mylib.dylib
  Referenced from: /path/to/myprogram
  Reason: image not found
Abort trap: 6

The easiest way is simply to run the program. If the shared library is missing, you'll get an output similar to this:

dyld: Library not loaded: mylib.dylib
  Referenced from: /path/to/myprogram
  Reason: image not found
Abort trap: 6

You can also run the following command:

objdump -r --dylibs-used /path/to/myprogram

This will essentially give you the same output as the otool command, you've mentioned in your question (many years ago, Apple replaced the old toolchain with a llvm based one, so otool on recent macOS versions will just call objdump). The program lists the shared libraries that the program expects - you can then check manually if you actually have those files. I.e. is there a file in that path with that name, is it readable by your user and does it contain a valid dynamic library.

Source Link
jksoegaard
  • 79.6k
  • 4
  • 133
  • 204

The easiest way is simply to run the program. If the shared library is missing, you'll get an output similar to this:

dyld: Library not loaded: mylib.dylib
  Referenced from: /path/to/myprogram
  Reason: image not found
Abort trap: 6