转载自:
升级CMAKE:https://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu-14-04
解决CMAKE升级后出现的问题:https://stackoverflow.com/questions/18615451/cmake-missing-modules-directory
Ubuntu14.04下升级cmake
1、通过下载安装包安装,从这里获取安装包: Downloads,这里安装3.2.2版本。
$ sudo apt-get install build-essential $ wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz $ tar xf cmake-3.2.2.tar.gz $ cd cmake-3.2.2 $ ./configure $ make $ sudo make install
注意:安装完成后还有一道重要的工序:
source ~/.bashrc
否则CMAKE_BOOT不会被重新注册,在cmake时会出现如下错误:
CMake Error: Could not find CMAKE_ROOT !!! CMake has most likely not been installed correctly. Modules directory not found in
2、通过PPA安装:
$ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:george-edison55/cmake-3.x $ sudo apt-get update
还未安装cmake:
$ sudo apt-get install cmake
安装过cmake:
$ sudo apt-get upgrade
注明:推荐第一种方法,亲测有效!
时间: 2024-12-10 17:19:47