前言:由于安装了cuda10.0遇到了问题,必须更新相关的cmake版本,具体见 NOTFOUND CUDA_cublas_device_LIBRARY
参考安装cmake链接 Linux下安装cmake步骤详解(图文)
一、卸载
sudo apt-get autoremove cmake
二、安装
下载打开网址:http://www.cmake.org/cmake/resources/software.html,找到最新版本的位置。有两个版本发布:Source Distribution 和 Binary Distribution,前者是源代码版,你需要自己编译成可执行软件。后者是已经编译好的可执行版,直接可以拿来用的。我使用了前者。
解压缩
确保已经安装了g++
在cmake-x.x.x文件夹里
# ./bootstrap
# gmake(我这里不知道为什么gmake运行不了,用的是make
# sudo make install (刚开始没有加sudo导致错误 Makefile:83: recipe for target 'install' failed make: *** [install] Error 1)
最后check版本有没有问题:cmake --version