1.通过以下命令查询cmake版本。
cmake --version
2.这里,我并没有卸载旧版本的cmake,而是直接安装新版本,而且这样没有出现问题。【非必须】
可去http://www.cmake.org/files查找需要的版本,写本博客时最新版为3.11.3,以此为例。
sudo apt-get install build-essential
wget http://www.cmake.org/files/v3.15/cmake-3.15.7.tar.gz
tar xf cmake-3.15.7.tar.gz
cd cmake-3.15.7
./configure
make
sudo make install
3.创建cmake的软连接
ln -sf /your cmake3.11 path/bin/* /usr/bin/
ln -sf /your/cmake-3.11.3/path/bin/* /usr/bin/
这个说是在sudo make install 的过程中已经建立软链接了。
4.然后,输入以下命令查询cmake版本。
cmake --version
如果输出以下信息,则表明安装成功。
cmake version 3.15.7
CMake suite maintained and supported by Kitware (kitware.com/cmake).
问题:
cmake --version
信息是:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most lik

最低0.47元/天 解锁文章
873

被折叠的 条评论
为什么被折叠?



