Getting error while loading gurobi package in Rstudio.
Answered> library(gurobi)
Error: package or namespace load failed for ‘gurobi’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/localad.tech/yala/R/x86_64-pc-linux-gnu-library/4.2/gurobi/libs/gurobi.so':
libgurobi110.so: cannot open shared object file: No such file or directory
In addition: Warning message:
package ‘gurobi’ was built under R version 4.3.2
This the error im getting while loading gurobi
R version used 4.2.1
gurobi version 11.0.0
-
Hi Yashass,
Please check the articles below for the full instructions on how to install Gurobi Optimizer for R:
Make sure to set the environment variables below. You might need to set GUROBI_HOME and LD_LIBRARY_PATH varaibles in both ~/.bashrc and ~/.profile.
- GUROBI_HOME should point to your <installdir>.
- PATH should be extended to include <installdir>/bin.
- LD_LIBRARY_PATH should be extended to include <installdir>/lib.
As mentioned in Supported Platforms for Gurobi, Gurobi version 11.0.0 supports R version 4.3. Please consider updating your R installation to version 4.3 as well.
Best regards,
Maliheh
1 -
Thank you for your response.
0 -
RUN echo 'export GUROBI_HOME="/opt/gurobi1100/linux64"' >> /etc/bash.bashrc
RUN echo 'export PATH=${PATH}:${GUROBI_HOME}/bin' >> /etc/bash.bashrc
RUN echo 'export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"' >> /etc/bash.bashrcThis is how environment variables are set
0 -
Check the article How do I set system environment variables for Gurobi? for setting the environment variables in Linux.
Best regards,
Maliheh
0
Please sign in to leave a comment.
Comments
4 comments