Installation fail on Debian 5.0

155 views
Skip to first unread message

martyn

unread,
Aug 25, 2010, 5:46:46 AM8/25/10
to gevent: coroutine-based Python network library
Hi,
I'm trying to install gevent on a debian 5.0 64bits
I installed thoses packages before

aptitude install python-all-dev
aptitude install build-essential
aptitude install libevent
aptitude install libevent-dev
easy_install greenlet

And now GEVENT :
easy_install gevent
Searching for gevent
Reading http://pypi.python.org/simple/gevent/
Reading http://www.gevent.org/
Reading http://gevent.org/
Best match: gevent 0.13.0
Downloading http://pypi.python.org/packages/source/g/gevent/gevent-0.13.0.tar.gz#md5=8f687002c6fcbdf8b323319f451ba4af
Processing gevent-0.13.0.tar.gz
Running gevent-0.13.0/setup.py -q bdist_egg --dist-dir /tmp/
easy_install-Yb7Rfa/gevent-0.13.0/egg-dist-tmp-Gz7Cp-
gevent/core.c:651: warning: parameter names (without types) in
function declaration
gevent/core.c: In function
‘__pyx_pf_6gevent_4core_get_header_version’:
gevent/core.c:5782: warning: label ‘__pyx_L1_error’ defined but not
used
gevent/core.c: In function ‘__pyx_pf_6gevent_4core_reinit’:
gevent/core.c:5842: warning: label ‘__pyx_L1_error’ defined but not
used
gevent/core.c: In function
‘__pyx_pf_6gevent_4core_15http_connection_4peer___get__’:
gevent/core.c:12869: error: ‘ev_uint16_t’ undeclared (first use in
this function)
gevent/core.c:12869: error: (Each undeclared identifier is reported
only once
gevent/core.c:12869: error: for each function it appears in.)
gevent/core.c:12869: error: expected ‘;’ before ‘__pyx_v_port’
gevent/core.c:12921: error: ‘__pyx_v_port’ undeclared (first use in
this function)
gevent/core.c: In function ‘__pyx_pf_6gevent_4core_4http___init__’:
gevent/core.c:13787: warning: implicit declaration of function
‘evhttp_new’
gevent/core.c:13787: warning: assignment makes pointer from integer
without a cast
gevent/core.c: In function ‘__pyx_pf_6gevent_4core_4http_bind’:
gevent/core.c:14048: warning: implicit declaration of function
‘evhttp_bind_socket’
gevent/core.c: In function ‘__pyx_pf_6gevent_4core_4http_accept’:
gevent/core.c:14152: warning: implicit declaration of function
‘evhttp_accept_socket’
gevent/core.c: At top level:
gevent/core.c:18314: error: expected ‘)’ before ‘val’
error: Setup script exited with error: command 'gcc' failed with exit
status 1


I tried a solution found in that group with the git gevent branch :

git branch -a
* upstream
origin/HEAD
origin/close-socket-cancel-event
origin/pywsgi-without-basehttpserver
origin/upstream
origin/wip-3-all
origin/wip-all
origin/wip-config
origin/wip-download
origin/wip-setup-config
ns38966:~/gevent# git checkout origin/wip-all
Note: moving to "origin/wip-all" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 1033f59... simplify backdoor.py. also close connection
on SystemExit.
ns38966:~/gevent# python setup.py build_libevent build install
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'build_libevent'


So I can't install properly gevent on e debian.
Any suggestion are welcome.

Executier Godlike

unread,
Aug 25, 2010, 5:59:35 AM8/25/10
to gev...@googlegroups.com, martyn....@gmail.com
Hello!

Gevent requires libevent 1.4.x or later. Check that debian has correct
version(if i'm not wrong lenny shipped with 1.3).

> Hi,
> I'm trying to install gevent on a debian 5.0 64bits

--
Alexandre Kandalintsev

Denis Bilenko

unread,
Aug 25, 2010, 6:04:26 AM8/25/10
to gev...@googlegroups.com
The libevent package in Debian 5.0 is too old. You need libevent 1.4
while Debian 5.0 has libevent 1.3.

What you can do is to install libevent from lenny-backports as
explained here: http://backports.org/dokuwiki/doku.php?id=instructions

After you've set up backports on your server, the right command would
be something like
apt-get install -t lenny-backports libevent-dev libevent-1.4-2

If you don't have root access, then download libevent from
http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz, build it
with
./configure --with-pic --disable-shared
make

and then build gevent with

gevent$ python setup.py build --libevent /path/to/libevent

Using backports is easier though.

martyn CLEMENT

unread,
Aug 25, 2010, 6:21:40 AM8/25/10
to gev...@googlegroups.com
Yes, thank you, libevent1.3 was installed.
I followed your instruction with success. 
It seems to work properly now.

Martyn

2010/8/25 Denis Bilenko <denis....@gmail.com>

Ralf Schmitt

unread,
Aug 25, 2010, 6:42:21 AM8/25/10
to gev...@googlegroups.com
martyn <martyn....@gmail.com> writes:

> Hi,


> I tried a solution found in that group with the git gevent branch :
>
> git branch -a
> * upstream
> origin/HEAD
> origin/close-socket-cancel-event
> origin/pywsgi-without-basehttpserver
> origin/upstream
> origin/wip-3-all
> origin/wip-all
> origin/wip-config
> origin/wip-download
> origin/wip-setup-config
> ns38966:~/gevent# git checkout origin/wip-all
> Note: moving to "origin/wip-all" which isn't a local branch
> If you want to create a new branch from this checkout, you may do so
> (now or later) by using -b with the checkout command again. Example:
> git checkout -b <new_branch_name>
> HEAD is now at 1033f59... simplify backdoor.py. also close connection
> on SystemExit.
> ns38966:~/gevent# python setup.py build_libevent build install

try this instead:

$ GEVENT_DOWNLOAD_LIBEVENT=1 python setup.py install

Reply all
Reply to author
Forward
0 new messages