Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/gurobi/libs/gurobi.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/gurobi/libs/gurobi.so, 6): Library not loaded: libgurobi65.so
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/gurobi/libs/gurobi.so
Reason: image not found
Error: package or namespace load failed for ‘gurobi’
The issue is that libgurobi65.so can't be found, which based on my research has something to do with the DYLD_LIBRARY_PATH environment variable. What's odd is that it works fine in RStudio, but errors when R is run outside of RStudio.
Anyone else encountered this issue? Thanks!