Library path changes with otool

I have been using the Fermi-Science tools a lot recently to investigate GRB’s under the recent Pass-8 analysis. These tools can be downloaded and installed from the Fermi website. The installation sets up a directory holding sub-folders, libraries, executables etc. However, some of the libraries referred to by the executables are incorrect (? - or is it just me?), not specifying the full path and so the exec. file cannot run. This can be fixed using otool in OSX.

First list all the shared libraries that this exec. file calls upon:

    otool -L name_of_file

In order to change the path to a libary, simply use install_name_tool:

    install_name_tool -change old_path new_path name_of_file

Running otool again should now show that the path has been changed.

Categories:

Updated: