You are viewing a read-only archive of the Blogs.Harvard network. Learn more.
Skip to content

OS X’s version of ldd

I’m used to using ldd to help list shared libraries for programs in UNIX-land. If you’re a UNIX Admin type person or a UNIX developer ldd is really valuable for trying to figure out what an executable file needs to run.Naturally I tried to use ldd on OS X and noticed this:

(555)  lddbash: ldd: command not found

OS X has a different tool called otool which handles that functionality. Here’s an example:

(556)  otool -L ruby
ruby:        
/usr/local/lib/libruby.dylib (compatibility version 1.8.0, current version 1.8.0)        
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 218.0.0)        
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)

Happy otool’ing

Be Sociable, Share!