"CMAKE_CXX_COMPILER broken" while compiling with CMake
You are trying to use C compiler gcc
as C++ one, which is wrong.
You need to install g++
or other C++ compiler.
You should try installing build-essential
if you haven't done so.
Try this
sudo apt-get update
sudo apt-get install -y build-essential