Prehistory You need to deploy Odoo 9 on AWS. Instance set:

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS" NAME="Ubuntu" VERSION="14.04.3 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.3 LTS" VERSION_ID="14.04". 

I am new to this business, so I started using this algorithm http://devdrive.ru/post/Odoo:Installation/ . I stopped on installing all the necessary packages with the command:

(env) $ pip install -r requirements.txt

 warning: manifest_maker: standard file '-c' 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 reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'Makefile' warning: no files found matching 'Modules/LICENSE' writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt' running build_ext building '_ldap' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/Modules x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.19 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o Modules/LDAPObject.c:18:18: fatal error: sasl.h: No such file or directory #include <sasl.h> ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Cleaning up... Command /home/odoo/env/bin/python -c "import setuptools, tokenize;__file__='/home/odoo/env/build/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oOhJcn-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/odoo/env/include/site/python2.7 failed with error code 1 in /home/odoo/env/build/python-ldap Storing debug log for failure in /home/odoo/.pip/pip.log 

What could be the way out in this case?

  • stackoverflow.com/questions/26053982/… Seems to have found a solution - Rado Duoistin
  • It seems in this place the guys listed everything that you can without understanding the problem. I have not gone. What is the matter, did not understand. I came across an article on habrahabr.ru/post/206024 , where the guy discusses why it is not convenient for him to use virtualenv. He mentions requirements.txt. Can the composition of this file somehow cause my error? - Rado Duoistin
  • sasl.h header file sasl.h , which is listed in Modules/LDAPObject.c , in place? At least, this is indicated by an error. - approximatenumber

1 answer 1

The error occurs due to the fact that the header file (Modules / LDAPObject.c: 18: 18: fatal error: sasl.h: No such file or directory) is not needed to compile python-ldap ( https: // pypi. python.org/pypi/python-ldap ). Some python packages contain parts implemented in C, and therefore they need to be compiled. At the same time, due to possible incompatibility in pypi, pre-compiled linux packages are not laid out and compilation needs to be done on the machine.

To install the necessary header files you can use

sudo apt-get install libsasl2-dev

You might also need to install python-dev and libldap2-dev

sudo apt-get install python-dev libldap2-dev

About requirements.txt - this file simply stores a list of dependencies. It can be a problem if it contains an incorrect name / version of the package or if the package (its version) disappeared from pypi.

  • Or download from under sudo pip instal - Rado Duoistin
  • If I understand the problem correctly, using sudo pip install should not solve the problem, since the necessary header files will still be missing. Using sudo can solve permission denied problems. For example, if during the installation process you need to write to a directory to which the current user does not have rights. - Misha Andrievsky