How to compile in HTB machines?

I am trying to escalate privileges using a kernel exploit written in C language in a Linux machine. However, I can not compile the exploit because the machine does not have the gcc compiler installed. Does anyone with more experience know how could I compile it?