otool -L
二进制文件的依赖项:
$ otool -L libeditorlib.dylib
libeditorlib.dylib:
libeditorlib.1.dylib (compatibility version 1.0.0, current version 1.0.0)
@rpath/libtbb.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libnlopt.0.dylib (compatibility version 0.0.0, current version 0.10.0)
/usr/local/opt/openvdb/lib/libopenvdb.8.0.dylib (compatibility version 8.0.0, current version 8.0.1)
/usr/local/opt/ilmbase/lib/libHalf-2_5.25.dylib (compatibility version 25.0.0, current version 25.0.4)
/usr/local/opt/gmp/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0)
/usr/local/opt/mpfr/lib/libmpfr.6.dylib (compatibility version 8.0.0, current version 8.0.0)
@rpath/QtQuickControls2.framework/Versions/5/QtQuickControls2 (compatibility version 5.12.0, current version 5.12.4)
一些依赖项位于/usr/local/opt/
. 我想更改它们以便@rpath/
搜索它们。
我将不得不像这样一个接一个地更改它们:
$ install_name_tool -change /usr/local/opt/openvdb/lib/libopenvdb.8.0.dylib @rpath/libopenvdb.8.0.dylib libeditorlib.dylib
有没有方便的方法将所有更改/user/local/opt/...
为@rpath
?