问题
When I try to install pycrypto on a GCE i get the error "no acceptable C compiler found in $PATH".
I use pip like this
pip install pycrypto
The GCE is a backports-debian-7-wheezy-v20131127 image. I assumed the debian image would have gcc installed, but typing 'gcc' gives 'command not found'.
Is there a way to install pycrypto without having to use gcc?
Has anyone managed to install pycrypto on GCE yet?
回答1:
Try:
sudo apt-get install python-crypto
I'm glad it worked out
回答2:
The default cloud images for GCE are pretty stripped down, and don't include things like compilers, etc because you don't necessarily want a compiler on your webserver.
Using apt to install pycrypto works; if you do want a compiler, use apt-get install gcc
. Similarly, you may want to install x11, emacs, etc if you're using your VM for development.
Using the pycrypto package from Debian is a good idea if you want to make sure that you get security updates, so I'd recommend that over installing your own.
来源:https://stackoverflow.com/questions/22330678/no-acceptable-c-compiler-found-in-path-on-google-compute-engine