no acceptable C compiler found in $PATH on google compute engine

拥有回忆 提交于 2019-12-13 04:34:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!