CPLEX之Linux版本安装方式

写在前面

关于IBM官网学生认证白嫖来的CPLEX,在这里分享给大家(文末有链接)

环境:CentOS7版本

关于windows的.exe

直接点击执行即可

关于linux的.bin

  1. 将其copy到linux某文件夹中

  2. 赋予该文件运行权限

    chmod 777 cplex_studio2210.linux_x86_64.bin
    
  3. 执行该文件

    sudo ./cplex_studio2210.linux_x86_64.bin
    
  4. 根据提示,一路enter

在这里插入图片描述

(默认安装到 /opt/ibm/ILOG/CPLEX_Studio221)

  1. 配置环境变量

    vim ~/.bashrc
    

    添加cplex和cpoptimizer的安装路径(默认为/opt/ibm/ILOG/CPLEX_Studio221)

    export PATH=$PATH:/opt/ibm/ILOG/CPLEX_Studio221/cplex/bin/x86-64_linux:/opt/ibm/ILOG/CPLEX_Studio221/cpoptimizer/bin/x86-64_linux
    

    使.bashrc生效

    source ~/.bashrc
    
  2. 测试是否成功

    cplex
    

    在这里插入图片描述

​ 附带上链接

​ 链接:https://pan.baidu.com/s/1HGIRfqL-GNaur4qxR6rryg
​ 提取码:zwnk

  • 13
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
Sure! Here is a step-by-step guide to installing CPLEX on Linux: 1. Download the CPLEX package for Linux from the IBM website. Make sure to choose the appropriate version for your system. 2. Extract the downloaded package to a directory of your choice. You can use the following command to extract the tar.gz file: ``` tar -xf cplex_studioXX.XX.linux-x86-64.bin.tar.gz ``` 3. Open a terminal and navigate to the extracted directory: ``` cd cplex_studioXX.XX.linux-x86-64 ``` 4. Run the CPLEX installer using the following command: ``` ./cplex_studio.bin ``` 5. Follow the on-screen instructions to complete the installation. Make sure to take note of the installation directory. 6. After the installation is complete, you need to set up the CPLEX environment variables. Open the `.bashrc` file in your home directory using a text editor: ``` nano ~/.bashrc ``` 7. Add the following lines at the end of the file, replacing `<CPLEX_INSTALL_DIR>` with the actual installation directory: ``` export CPLEX_HOME=<CPLEX_INSTALL_DIR>/cplex export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CPLEX_HOME/bin/x86-64_linux export PATH=$PATH:$CPLEX_HOME/bin/x86-64_linux ``` 8. Save and close the file, then reload the `.bashrc` file to apply the changes: ``` source ~/.bashrc ``` 9. Test the installation by running the `oplrun` command in the terminal: ``` oplrun -v ``` If you see the version information, it means CPLEX has been successfully installed. That's it! You have successfully installed CPLEX on Linux. You can now start using it for optimization problems.
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值