How to Fix error: command 'gcc' failed with exit status 1

If you get this error like I did when installing a python virtual environment, do the following on the command line:

sudo apt-get install python2.7-dev

And continue to install the virtual environment:

# install python dev
sudo apt-get install python2.7-dev
# install easy_install
sudo python
# pip install virtualenv
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
This post is available on GitHub.
Posted .


  1. anonymous

    Hi! I have this problem but on mac! Can you help me?

  2. anonymous

    Look closely at the error log, what do you see causing the command 'gcc' failed with exit status 1 error?

Leave a Reply