Solve the problem of the C compiler identification is unknown or the cxx compiler identification is unknown in the process of using cmake

The compiler is not installed. You can run the following commands from the command line depending on your system choice.
RedHat-based

yum install gcc gcc-c++

Debian/Ubuntu-based

apt-get install cmake gcc g++

If you don’t have enough permissions, preface the command with sudo, execute
and recompile your project

Read More: