I found there's an environmental variable in R called DYLD_FALLBACK_LIBRARY_PATH. It contains different values in RStudio than straight R, but in both cases /Library/Frameworks/R.framework/Resources/lib is present. Copying the libgurobi65.so file to this directory solved the problem.
If anyone has a solution that doesn't involve copying the file, or can explain why this happened, I'd be curious to hear.
I've done this, and it means that I can call the library of Gurobi, but I still can't run the functions inside maxcovr.
This is rather frustrating, and really weird behaviour to replicate. It might be something to do with RStudio, but it might also have something to do with Gurobi
Had this problem where Gurobi would run fine inside RStudio, but then it wouldn't work if I can an RScript or called
knitr
.I could run
library(gurobi)
inside RStudio, but when I knitted a chunk, it couldn't load itSo I googled my error message:
And then Found an answer on google groups with a nigh identical error: https://groups.google.com/forum/#!topic/gurobi/p7oZbXcueBM
They said:
I've done this, and it means that I can call the library of Gurobi, but I still can't run the functions inside
maxcovr
.This is rather frustrating, and really weird behaviour to replicate. It might be something to do with RStudio, but it might also have something to do with Gurobi