centos中cmake安装编译报错

1、安装cmake

wget http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz

# tar zxvf cmake-3.1.1.tar.gz

# cd cmake-3.1.1

# ./bootstrap

# make && make install

报错1:

Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.

解决1:# yum install -y gcc

报错2:

Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.

解决2: yum install gcc-c++

posted @ 2020-04-20 15:56  plumm  阅读(2159)  评论(0)    收藏  举报