cmake安装

来源:互联网 发布:中兴网络机顶盒说明书 编辑:程序博客网 时间:2024/04/28 05:59

在安装caffe的过程中,碰到了cmake命令不能够使用的情况,于是,开始安装cmake
1 首先是按照教程(该网址
http://www.cnblogs.com/zhoulf/archive/2013/02/03/2890717.html
)安装的2.8.10.2,最后也出现了根据cmake—version有相应的版本号,也就是安装成功了,但是在正式使用的时候,提示我cmake命令的版本过低,需要更高的版本2.8.12以上的版本。
使用的命令有:
Wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
Tar –zxvf cmake-2.8.10.2.tar.gz
Rm –rf cmake-2.8.10.2.tar.gz
Cd cmake-2.8.10.2
./configure
Make
Make install
Mv cmake-2.8.10.2 make
Vi /etc/profile
PATH
2 再一次下载cmake
我通过win7从官网上https://cmake.org/download/下载了最新的版本,然后通过rz命令传输到linux上,然后继续按照上述步骤进行处理,看是出现什么情况
成功,版本号是version 3.9.3
再次放到caffe中使用,出现如下问题,按照网上的教程
(http://blog.csdn.net/u012643122/article/details/47665857)解决,还是没有解决
[root@xaver2 build]# export CXXFLAGS=”-fPIC” && cmake .. && make VERBOSE=1
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/cmake/share/cmake-3.9
CMake Error: Error executing cmake::LoadCache(). Aborting.

[root@xaver2 build]# echo $CMAKE_ROOT

[root@xaver2 build]# export CMAKE_ROOT=/usr/local/cmake
[root@xaver2 build]# echo $CMAKE_ROOT
/usr/local/cmake
[root@xaver2 build]# export CMAKE_ROOT=/usr/local/cmake
[root@xaver2 build]# export CXXFLAGS=”-fPIC” && cmake .. && make VERBOSE=1
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/cmake/share/cmake-3.9
CMake Error: Error executing cmake::LoadCache(). Aborting.

原创粉丝点击