1

Topic: can't install python-ldap module

Hi! I'm trying to install iRedAdmin-PRO in my iRedMail server.
I'm following this instructions: http://www.iredmail.org/admin_installation_rhel.html
But I can't install the apache module mod_wsgi.

[root@correo ~]# easy_install web.py Jinja2 python-ldap==2.3.12 netifaces
Searching for web.py
Best match: web.py 0.34
Processing web.py-0.34-py2.4.egg
web.py 0.34 is already the active version in easy-install.pth

Using /usr/lib/python2.4/site-packages/web.py-0.34-py2.4.egg
Processing dependencies for web.py
Searching for Jinja2
Best match: Jinja2 2.2.1
Jinja2 2.2.1 is already the active version in easy-install.pth

Using /usr/lib/python2.4/site-packages
Processing dependencies for Jinja2
Searching for python-ldap==2.3.12
Reading http://cheeseshop.python.org/pypi/python-ldap/
Reading http://www.python-ldap.org/
Reading http://cheeseshop.python.org/pypi/python-ldap/2.3.12
Best match: python-ldap 2.3.12
Downloading http://pypi.python.org/packages/source/ … 94ba5c6f31
Processing python-ldap-2.3.12.tar.gz
Running python-ldap-2.3.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xM1XuT/python-ldap-2.3.12/egg-dist-tmp-Ome7lC
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
Modules/constants.c: In function ‘LDAPinit_constants’:
Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_CRLFILE’ undeclared (first use in this function)
Modules/constants.c:184: error: (Each undeclared identifier is reported only once
Modules/constants.c:184: error: for each function it appears in.)
error: Setup script exited with error: command 'gcc' failed with exit status 1

What could be happening?

Thank you in advance!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: can't install python-ldap module

Please use "python-ldap==2.3.11" instead, follow the installation guide STRICTLY.

python-ldap-2.3.12 was released yesterday.

3

Re: can't install python-ldap module

[root@correo ~]# easy_install web.py Jinja2 python-ldap==2.3.11 netifaces
Searching for web.py
Best match: web.py 0.34
Processing web.py-0.34-py2.4.egg
web.py 0.34 is already the active version in easy-install.pth

Using /usr/lib/python2.4/site-packages/web.py-0.34-py2.4.egg
Processing dependencies for web.py
Searching for Jinja2
Best match: Jinja2 2.2.1
Jinja2 2.2.1 is already the active version in easy-install.pth

Using /usr/lib/python2.4/site-packages
Processing dependencies for Jinja2
Searching for python-ldap==2.3.11
Reading http://cheeseshop.python.org/pypi/python-ldap/
Reading http://www.python-ldap.org/
Reading http://cheeseshop.python.org/pypi/python-ldap/2.3.12
No local packages or download links found for python-ldap==2.3.11
error: Could not find suitable distribution for Requirement.parse('python-ldap==2.3.11')

4

Re: can't install python-ldap module

It works for me here:

OK, if you can't install it via easy_install, just install our binary package here:
For i386: http://iredmail.org/yum/rpms/5/python-l … d.i386.rpm
For x86_64: http://iredmail.org/yum/rpms/5/python-l … x86_64.rpm

If you already have iRedAdmin open source edition installed, you can skip this package because iRedMail already install it for you during installation.

5

Re: can't install python-ldap module

I still don't know what I'm doing wrong!
I started again with a fresh installation. This time, iRedOs.
I copy the iRedAdmin-PRO module to the directory /var/www, and create a new symbol link.

[root@mail www]# ll
total 316
drwxr-xr-x  9 root root   4096 Aug 11 15:01 awstats
drwxr-xr-x  2 root root   4096 Apr  4 18:23 cgi-bin
drwxr-xr-x  3 root root   4096 Aug 11 14:27 error
drwxr-xr-x  2 root root   4096 Aug 11 14:28 html
drwxr-xr-x  3 root root   4096 Aug 11 14:28 icons
lrwxrwxrwx  1 root root     19 Aug 11 15:23 iredadmin -> iRedAdmin-Pro-1.2.0
drwxr-xr-x  8 root root   4096 Aug 11 14:28 iRedAdmin-0.1.3
drwxr-xr-x  9 root root   4096 Aug 11 15:33 iRedAdmin-Pro-1.2.0
-rw-------  1 root root 227548 Aug 11 15:17 iRedAdmin-Pro-1.2.0.tar.bz2
lrwxrwxrwx  1 root root     29 Aug 11 14:28 phpldapadmin -> /var/www/phpldapadmin-1.2.0.5
drwxr-xr-x 11 root root   4096 Jan 30  2010 phpldapadmin-1.2.0.5
lrwxrwxrwx  1 root root     41 Aug 11 14:28 phpmyadmin -> /var/www/phpMyAdmin-2.11.10-all-languages
drwxr-xr-x 10 root root   4096 Aug 11 14:28 phpMyAdmin-2.11.10-all-languages
lrwxrwxrwx  1 root root     28 Aug 11 14:28 roundcubemail -> /var/www/roundcubemail-0.3.1
drwxr-xr-x 11 root root   4096 Oct 31  2009 roundcubemail-0.3.1

And when I try to get into it:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

This is /var/log/httpd/ssl_error_log

[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40] mod_wsgi (pid=2624): Target WSGI script '/var/www/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40] mod_wsgi (pid=2624): Exception occurred processing WSGI script '/var/www/iredadmin/iredadmin.py'.
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40] Traceback (most recent call last):
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40]   File "/var/www/iredadmin/iredadmin.py", line 28, in ?
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40]     from libs import iredbase, iredutils
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40]   File "/var/www/iredadmin/libs/iredbase.py", line 120, in ?
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40]     import iredutils
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40]   File "/var/www/iredadmin/libs/iredutils.py", line 271, in ?
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40]     def getSizelimitFromAccountLists(accountList, sizelimit=session['accountSizelimit'], page=1,):
[Wed Aug 11 15:47:06 2010] [error] [client 192.168.10.40] KeyError: 'accountSizelimit'

6

Re: can't install python-ldap module

Oops, this is my fault.

Please open libs/iredutils.py, find "sizelimit=session['accountSizelimit'],", change it to "sizelimit=50".

I'm so sorry for my mistake.

7

Re: can't install python-ldap module

Great!!! Thank you! It worked!

I'm really impressed with the iRedAdmin-Pro module!!

8

Re: can't install python-ldap module

Hope you enjoy iRedMail & iRedAdmin-Pro smile