因为Ubuntu14.04的cmake版本为2.8.x,而若是须要cmake3.x版本时,没法生成makefile,有两种方法能够安装cmake3.4.1:ui
sudo apt-get install software-properties-common sudo add-apt-repository ppa:george-edison55/cmake-3.x sudo apt-get update sudo apt-get install cmake sudo apt-get upgrade方法2:
sudo apt-get install build-essential wget http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz tar xf cmake-3.4.1.tar.gz cd cmake-3.4.1 ./configure make
sudo apt-get install checkinstall sudo checkinstall
sudo make install
最后在终端输入:cmake --version若是显示cmake version 3.4.1则安装成功!