Solution to `linker` error while building `bat`

I was trying to install bat [https://github.com/sharkdp/bat], from source, the clone of cat command with syntax highlighting and Git integration, in a CentOS [https://www.centos.org/] machine, via cargo, Rust package installer. But it gave me this error: error: linker `cc` not found | = note: No…