Mac OS X 库路径环境变量DYLD_LIBRARY_PATH

安装了oracle instant client,执行sqlplus时,找不到库文件:

1
2
3
dyld: Library not loaded: /ade/dosulliv_sqlplus_mac/oracle/sqlplus/lib/libsqlplus.dylib
Referenced from: /opt/oracle/instantclient_11_2/sqlplus
Reason: image not found

Mac的库路径环境变量与linux不同,其名字为DYLD_LIBRARY_PATH
bashrc中设置此变量:

1
export DYLD_LIBRARY_PATH=$ORACLE_HOME:$DYLD_LIBRARY_PATH

问题解决。

References:
[1] 环境变量LIBRARY_PATH的设置

===
[erq]