linux升级cmake

如果出现如下报错,就应该升级cmake了!
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.1 or higher is required.  You are running version 2.8.12.2


-- Configuring incomplete, errors occurred!

官网
可以下载各个版本的cmake: https://cmake.org/files/

升级
1.下载cmake,这里选择cmake-3.12.4,当然可以选择更新的版本:

    进入https://cmake.org/files/v3.12/
    选择cmake-3.12.4.tar.gz

2.解压后进入文件夹进行编译编译

./bootstrap
make
sudo make install

3.查看版本

cmake --version

打印如下,说明安装成功了!
cmake version 3.12.4

安装完后,发现make会出报错如下:

CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.

hash -r

问题3
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 

sudo yum install openssl-devel

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值