【linux】安装gae时提示安装python-gevent

来源:互联网 发布:sql临时表 编辑:程序博客网 时间:2024/06/06 03:25

2013年1月5号:

       折腾了一天,GAE终于成功联网,回顾一下整个安装过程,貌似走了很多弯路,尤其是这篇博文,写的很扯淡了。之前以为有WARNING,就无法使用,最后才发现,最新的GAE是不依赖python-gevent的,我只是人为的把问题想得过于复杂了。


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------


根据网上搜到的教程安装gae,在安装的最后,执行

python proxy.py

却提示
WARNING: python-gevent not installed. `curl -k -L http://git.io/I9B7RQ|sh`

根据提示执行
curl -k -L http://git.io/I9B7RQ|sh

提示
The program 'curl' is currently not installed. You can install it by typing:apt-get install curl

根据提示执行
apt-get install curl

安装成功再执行
curl -k -L http://git.io/I9B7RQ|sh

又提示
gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exiting now

根据在公司用FTP传输的经验,可能curl传输的不是二进制文件,导致无法解压缩,然而在网上搜索curl也没用找到如何以二进制传输,用man curl查看,提示中也没有讲如何以二进制传输。然后就想到手动下载,不用shell。

在firefox地址栏输入

http://git.io/I9B7RQ|sh
跳转到页面:

#!/bin/shcurl -O https://github.com/downloads/SiteSupport/gevent/gevent-1.0rc2.tar.gz && tar xvzpf gevent-1.0rc2.tar.gz && cd gevent-1.0rc2 && sudo python setup.py install

第二行是一组命令组合,先下载gevent,解压,然后安装。但是问题又出来了
curl -O https://github.com/downloads/SiteSupport/gevent/gevent-1.0rc2.tar.gz
用上述命令下载的gevent文件解压是,依然提示
gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exiting now

看来下载依然不是用二进制传输的。ftp问题多多,但是平时上网用浏览器下载文件根本不会遇到这种问题。灵机一动,是否可以直接用浏览器下载那。把

https://github.com/downloads/SiteSupport/gevent/gevent-1.0rc2.tar.gz
复制到浏览器地址栏,弹出下载,保存。进入下载目录,顺利解压。看来问题的确处在传输上。


继续进行,进入gevent目录,执行

python setup.py install
,竟然又提示错误,此时只有满腹只有一个词,“我靠”,linux也太折腾人了。

gevent/gevent.core.c:5:20: fatal error: Python.h: No such file or directorycompilation terminated.error: command 'gcc' failed with exit status 1
网上搜了一下,是python的问题,下载python dev,问题解决

apt-get install python-dev


2012.12.29 gae没有安装成功


原创粉丝点击