As per your snippet, it seems to me you haven’t installed the gcc yet or this is not your $PATH variable.
To solve the error just install the gcc and correct your path variable. You can install the gcc by a simple command below:
apt-get install build-essential
Note: This a Debian-based command.
Now you are all set to go.