So I was thinking about learning some C this week, so I went to setting up everything. I was checking to make sure I had gcc installed using gcc -v, and I got the error

bash: /usr/bin/gcc: Permission denied

After this, I tried the same command using sudo, but got the error

sudo: gcc: command not found

If it's relevant, my Linux version is Pop_OS! 20.04 LTS, running kernel 5.8.0-7630-generic.

What should I do to resolve this issue?

  • My gcc is a symbolic link: /usr/bin/gcc -> gcc-5. /usr/bin/gcc-5 is a 1MB executable. It seems likely your install is incomplete. Nov 25, 2020 at 9:32
  • What should I do to resolve this? Is there any information I can provide that would help discover whatever the problem may be with it?
    – Zander
    Nov 25, 2020 at 9:42

1 Answer 1


So after a little digging, I managed to discover which gcc version was installed by using the command
ls /usr/lib/gcc/x86_64-linux-gnu

This revealed a folder called 9, and assuming this was the version of gcc installed, I used
sudo apt-get install --reinstall gcc-9

Following this, gcc -v worked fine without sudo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .