计算机知识分享网

【linux】linux下安装源码包cmake

下载cmake并进行编译安装,在/usr/local/src目录下执行
wget https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar vzxf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./configure
make -dj
make install
清空缓存
hash -r
不清空缓存,可能会出现找不到环境变量
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.10
cmake version 3.10.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).

#Linux