I am running Ubuntu LTS and I'm getting errors when trying to do some of my pip install stuff, like scrapy for example. This is the error I get:

Unable to execute gcc: No such file or directory
Error: command 'gcc' failed with exit status 1

I'm installing pip within a virtualenv. I tried to install build essentials with the following command but I still get the same error:

apt-get -y install build-essential

Can anyone help me understand where I have gone wrong please?

EDIT - A bit more information:

ubuntu@ip-10-164-8-155:/var/log$ gcc -v
The program 'gcc' can be found in the following packages:
 * gcc
 * pentium-builder
Try: sudo apt-get install <selected package>
  • What was the output of your apt-get -y install build-essential? You definitely do not have the gcc executable installed.
    – Alex G
    Aug 5, 2013 at 23:57

1 Answer 1


NOTE: from your gcc -v output Try: sudo apt-get install selected package

sudo apt-get install gcc

  • That message indicates that the command (gcc) wasn't found, but that Ubuntu can suggest a package that provides it (the gcc package in this case). Aug 6, 2013 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.