1. 获取cmake
获取地址:
https://cmake.org/files/
2. 编译安装
0 cd ~
1 wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
2 tar xvf cmake-3.5.2.tar.gz
This worked for me then:
3 cd cmake-3.5.2
4 ./bootstrap --prefix=/usr
这一步很关键,如果没有指定prefix,后面使用时会报错`Could not find CMAKE_ROOT`
5 make
6 sudo make install
3. check
cmake --version