(切记不可如下操作:
sudo apt-get autoremove cmake或sudo apt-get remove cmake
)
正确操作:
cmake --version (检查当前在用的cmake 版本号)
which cmake(采用这个命令查当前在用的cmake 版本路径)
Download | CMake 下载官网
下载cmake-3.10.2-Linux-x86_64二进制版本
建立软连接
sudo ln -s /home/swzn/dependence/cmake-3.10.2-Linux-x86_64/bin/cmake /home/swzn/.local/bin/cmake
报错ln: 无法创建符号链接'/home/swzn/.local/bin/cmake': 文件已存在
移除软连接
sudo rm -rf /home/swzn/.local/bin/cmake
然后再一次软连接
sudo ln -s /home/swzn/dependence/cmake-3.10.2-Linux-x86_64/bin/cmake /home/swzn/.local/bin/cmake
/u013834525/article/details/88524603?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control