install cmake

http://www.cmake.org/cmake/resources/software.html
download cmake-2.8.4.tar.gz


tar -xzvf cmake-2.*.tar.gz

cd cmake-2.*

依次执行:

./bootstrap

make

make install

注意:在安装cmake时如果没有安装g++会出现以下错误
Error when bootstrapping CMake Cannot find appropriate C++ compiler on this system Please specify one using environment variable CXX…
解决办法:先安装gcc-c++

安装GCC
sudo apt-get install  build-essential

make
make install

原文地址:https://www.cnblogs.com/lddhbu/p/2877312.html