CMAKE 编译报错

报错如下: CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found.
 没有安装 gcc 和 gcc-c++,执行cmake报如上错误:
yum install -y gcc
yum install -y gcc-c++

yacc: Command not found

 yum install -y byacc

WARNING: `flex' is missing on your system. You should only need it if
you modified a `.l' file. You may need the `Flex' package
in order for those modifications to take effect. You can get
`Flex' from any GNU archive site.
make[2]: *** [thriftl.cc] Error 1
make[2]: Leaving directory `/home/kunyang/hs2client-master/thirdparty/thrift-0.9.1/compiler/cpp'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/kunyang/hs2client-master/thirdparty/thrift-0.9.1/compiler/cpp'
make: *** [install-recursive] Error 1

yum -y install flex

原文地址:https://www.cnblogs.com/0xcafedaddy/p/8694454.html