参考:http://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu-14-04
1.判断相关软件是否安装
sudo apt-get install build-essential
2.删除先前版本的cmake(如果有的话)
sudo apt-get autoremove cmake
3.下载cmake3.2.2源码
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
4.解压
tar zxvf cmake3.2.2.tar.gz
5.进入cmake3.2.2文件夹,安装
- cd cmake3.2.2
- ./configure
- make
- sudo make install
6.设置环境变量
sudo gedit /etc/profile
在/etc/profile末尾加上对应的路径
- export PATH=cmake路径/bin:$PATH
7.保存,更新环境变量
source /etc/profile
8.确认
cmake --version
另外的方法:
https://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu-14-04
https://stackoverflow.com/questions/14519841/ubuntu-upgrading-software-cmake-version-disambiguation-local-compile