@cas Thanks. It was a RAM issue. When I expanded the RAM, gcc got installed successfully.