This question has been flagged
2 Replies
6879 Views

Hi,

I am trying to follow this article for installing OpenERP 7 on CentOS 5.9. However when I type the installation command 'python setup.py install' command. I get the following errors.

What could be wrong? Any idea.

Writing /tmp/easy_install-Pb1fGd/python-ldap-2.4.13/setup.cfg
Running python-ldap-2.4.13/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Pb1fGd/python-ldap-2.4.13/egg-dist-tmp-WrNqNC
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args: 
extra_objects: 
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) 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/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) 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/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:349: warning: function declaration isn't a prototype
Modules/ldapcontrol.c: In function 'encode_assertion_control':
Modules/ldapcontrol.c:352: warning: implicit declaration of function 'ldap_create_assertion_control_value'
Modules/constants.c: In function 'LDAPinit_constants':
Modules/constants.c:155: error: 'LDAP_OPT_DIAGNOSTIC_MESSAGE' undeclared (first use in this function)
Modules/constants.c:155: error: (Each undeclared identifier is reported only once
Modules/constants.c:155: error: for each function it appears in.)
Modules/constants.c:365: error: 'LDAP_CONTROL_RELAX' undeclared (first use in this function)
error: Setup script exited with error: command 'gcc' failed with exit status 1
Avatar
Discard
Best Answer

"error: Setup script exited with error: command 'gcc' failed with exit status 1"

Seems to be meaning that you are either missing gcc compiler or that it can't do compilation. It also seems that you are missing some python modules (ldap). Are you sure you have installed all required packages? I would recommend you to first check that before you read further my comment. It would be also easier to figure out your problem if you told which instructions you used for installation.

I'm not sure if this is connected to your problem but problem may be also that in CentOS 5.9 the python version is 2.4 and for openERP 7 python requirements seems to be python 2.6 or 2.7 (recommended one is 2.7) for some older openERP also 2.4 is said to be supported. The problem with 2.4 is that it doesn't include as many automatic python modules as 2.6 and 2.7 (many things changed when 2.6 came out if I remember right).

And before you ask: you can't upgrade your python version on CentOS because many essential packages (including yum) are made in python in CentOS so upgrading python version on CentOS will break the OS. So if you want to update your python in CentOS you have to install other python version manually and then be sure that openERP is using this other python version instead of the original one (you can find a lot of info about this with google).

If you have possibility to upgrade your centOS to centOS 6 it would be good because in centOS 6 python version is 2.6 which is supported by openERP.

Avatar
Discard
Best Answer

The installation tries to compile python-ldap and fails. I had to manually install openldap (see their web page for instructions) in order for python-ldap to compile correctly. BTW, the openldap installation requires Berkely DB by default. I installed only the client stuff so I don't have to install Berkley DB.

After that, I run the OpenERP installation again and it failed on compiling psycopg2. To fix that I installed the postgresql devel libs using yum install postgresql-devel.

UPDATE: I just finished the deployment and OpenERP is up and running on CentOS 5.4. I had some more bumps along the way but now everything is running.

Avatar
Discard