centos6安装cmake3.6.3
微wx笑 2022-05-03【操作系统】 3 0关键字: centos6 cmake
换源curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repocurl -o /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/
换源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo curl -o /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo yum clean all yum makecache yum install -y gcc gcc-c++ make wget curl
下载cmake
wget https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz tar zxf cmake-3.4.0.tar.gz cd cmake-3.4.0 ./bootstrap gmake gmake install
以上内容转自:https://blog.csdn.net/qq_43645782/article/details/121119720
参考安装之后执行 cmake 遇到一个问题
# cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
Segmentation fault
但是使用完整路径 /usr/local/bin/cmake 又可以用。
解决方法:
执行以下命令
hash -r
hash [-lr] [-p filename] [-dt] [name] Each time hash is invoked, the full pathname of the command name is determined by searching the directories in $PATH and remembered. Any previously-remembered pathname is discarded. If the -p option is supplied, no path search is performed, and filename is used as the full file name of the command. The -r option causes the shell to forget all remembered locations. The -d option causes the shell to forget the remembered location of each name. If the -t option is supplied, the full pathname to which each name corresponds is printed. If multiple name arguments are supplied with -t, the name is printed before the hashed full pathname. The -l option causes output to be dis‐ played in a format that may be reused as input. If no arguments are given, or if only -l is supplied, information about remembered commands is printed. The return status is true unless a name is not found or an invalid option is supplied.
本文由 微wx笑 创作,采用 署名-非商业性使用-相同方式共享 4.0 许可协议,转载请附上原文出处链接及本声明。
原文链接:https://www.ivu4e.cn/blog/system/2022-05-03/1180.html