〇、下载对应linux版本的gurobi(此处略)
一、解压下载的压缩包
tar -zxvf gurobi9.5.2_linux64.tar.gz -C /tmp
二、设置环境变量(追加内容到~/.bashrc文件)
export GUROBI_HOME="/usr/local/gurobi952/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
export GRB_LICENSE_FILE="/opt/gurobi/gurobi.lic"
三、激活gurobi(grbgetkey后的数字需要申请)
grbgetkey c77d9fcc-2e63-11ed-8c14-0242c2a8f001
激活成功显示如下信息:
info : grbgetkey version 9.5.2, build v9.5.2rc0
info : Contacting Gurobi license server...
info : License file for license ID 873017 was successfully retrieved
info : License expires at the end of the day on 2023-03-08
info : Saving license file...
In which directory would you like to store the Gurobi license file?