[R-SIG-Mac] Lost Library ?

Roger Koenker rkoenker at illinois.edu
Tue Sep 6 23:34:44 CEST 2016


This is a question about how to find a lost library needed for the gurobi R package.
Gurobi is a optimization system with various frontends including to R.
Even though I realize that few of you use, or may even know about, gurobi I hope
that there may be  some generic advice — my first  dubious attempts, contrary to Simon’s
periodic advice that use of DYLD_LIBRARY_PATH is frowned upon,  have proven futile.
Here is the basic story:

I've installed gurobi and its license file and this seems to work on a test problem from the command line,
but I would like to use the R package interface and have installed the R binary package that comes with
the gurobi download on a R 3.3.0 system on an osx 10.11.5 machine,   As far as I can see there is no
source version of the R package available.   The package “seems to” install, but I now see in R:

> library(gurobi)
Loading required package: gurobi
Loading required package: slam
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/gurobi/libs/gurobi.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/gurobi/libs/gurobi.so, 6): Library not loaded: libgurobi65.so
  Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/gurobi/libs/gurobi.so
  Reason: image not found

the library libgurobi65.so is sitting in /usr/local/lib so I don't understand why the
R process can't find it -- this is what the R package library thinks:

yzzy: otool -L g*

gurobi.so:
	gurobi.so (compatibility version 0.0.0, current version 0.0.0)
	libgurobi65.so (compatibility version 6.5.0, current version 6.5.2)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
	/Library/Frameworks/R.framework/Versions/3.2/Resources/lib/libR.dylib (compatibility version 3.2.0, current version 3.2.2)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0)

Many thanks for your help,
Roger

url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    rkoenker at uiuc.edu            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Urbana, IL 61801



More information about the R-SIG-Mac mailing list