安装Odoo先决条件时出现致命错误C1083

时间:2017-11-02 10:04:05

标签: python-2.7 ldap pip openerp

我在安装Odoo 11.0社区版时遇到错误。先决条件过程最终导致致命错误C1083。我已经尝试过这些东西了。

  1. 单独安装pip
  2. 通过https://www.userbooster.de/en/download/openldap-for-windows.aspx
  3. 安装OpenLDAP
  4. 安装Pyldap python-ldap https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyldap
  5. 的一个分支

    没有任何效果。我的windows10机器上有Python27 64位。

    这是我在运行pip install -r C:\unifiedexpert\odoo-11.0\requirements.txt

    时遇到的错误

    我得到的错误跟踪是:

        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\pyldap.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\pyldap.egg-info\SOURCES.txt'
      running build_ext
      building '_ldap' extension
      creating build\temp.win-amd64-2.7
      creating build\temp.win-amd64-2.7\Release
      creating build\temp.win-amd64-2.7\Release\Modules
      C:\Users\Nayyer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.28 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -IC:\Python27\include -IC:\Python27\PC /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-2.7\Release\Modules/LDAPObject.obj
      LDAPObject.c
      c:\users\nayyer\appdata\local\temp\pip-build-5aaqii\pyldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
      error: command 'C:\\Users\\Nayyer\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
    
      ----------------------------------------
      Failed building wheel for pyldap
      Running setup.py clean for pyldap
    Failed to build pyldap
    Installing collected packages: pyldap, PyPDF2, pyserial, six, python-dateutil, pytz, pyusb, PyYAML, qrcode, reportlab, requests, suds-jurko, python-stdnum, vatnumber, vobject, Werkzeug, XlsxWriter, xlrd, pypiwin32, xlwt, funcsigs, pbr, beautifulsoup4
      Found existing installation: pyldap 2.4.37
        Uninstalling pyldap-2.4.37:
          Successfully uninstalled pyldap-2.4.37
      Running setup.py install for pyldap ... error
        Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\nayyer\\appdata\\local\\temp\\pip-build-5aaqii\\pyldap\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\nayyer\appdata\local\temp\pip-qyihid-record\install-record.txt --single-version-externally-managed --compile:
        defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
        extra_compile_args:
        extra_objects:
        include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
        library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
        libs: ldap_r
        running install
        running build
        running build_py
        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
        creating build\lib.win-amd64-2.7
        copying Lib\ldapurl.py -> build\lib.win-amd64-2.7
        copying Lib\ldif.py -> build\lib.win-amd64-2.7
        copying Lib\dsml.py -> build\lib.win-amd64-2.7
        creating build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\__init__.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\async.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\compat.py -> build\lib.win-amd64-2.7\ldap
        creating build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\__init__.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\deref.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\libldap.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\openldap.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\ppolicy.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\psearch.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\pwdpolicy.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\readentry.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\sessiontrack.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\simple.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\controls\sss.py -> build\lib.win-amd64-2.7\ldap\controls
        copying Lib\ldap\cidict.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\dn.py -> build\lib.win-amd64-2.7\ldap
        creating build\lib.win-amd64-2.7\ldap\extop
        copying Lib\ldap\extop\__init__.py -> build\lib.win-amd64-2.7\ldap\extop
        copying Lib\ldap\extop\dds.py -> build\lib.win-amd64-2.7\ldap\extop
        copying Lib\ldap\filter.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\functions.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\ldapobject.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\logger.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\modlist.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\resiter.py -> build\lib.win-amd64-2.7\ldap
        copying Lib\ldap\sasl.py -> build\lib.win-amd64-2.7\ldap
        creating build\lib.win-amd64-2.7\ldap\schema
        copying Lib\ldap\schema\__init__.py -> build\lib.win-amd64-2.7\ldap\schema
        copying Lib\ldap\schema\models.py -> build\lib.win-amd64-2.7\ldap\schema
        copying Lib\ldap\schema\subentry.py -> build\lib.win-amd64-2.7\ldap\schema
        copying Lib\ldap\schema\tokenizer.py -> build\lib.win-amd64-2.7\ldap\schema
        copying Lib\ldap\syncrepl.py -> build\lib.win-amd64-2.7\ldap
        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
        running egg_info
        writing requirements to Lib\pyldap.egg-info\requires.txt
        writing Lib\pyldap.egg-info\PKG-INFO
        writing top-level names to Lib\pyldap.egg-info\top_level.txt
        writing dependency_links to Lib\pyldap.egg-info\dependency_links.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\pyldap.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\pyldap.egg-info\SOURCES.txt'
        running build_ext
        building '_ldap' extension
        creating build\temp.win-amd64-2.7
        creating build\temp.win-amd64-2.7\Release
        creating build\temp.win-amd64-2.7\Release\Modules
        C:\Users\Nayyer\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.28 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -IC:\Python27\include -IC:\Python27\PC /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-2.7\Release\Modules/LDAPObject.obj
        LDAPObject.c
        c:\users\nayyer\appdata\local\temp\pip-build-5aaqii\pyldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
        error: command 'C:\\Users\\Nayyer\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
    
        ----------------------------------------
      Rolling back uninstall of pyldap
    Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\nayyer\\appdata\\local\\temp\\pip-build-5aaqii\\pyldap\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\nayyer\appdata\local\temp\pip-qyihid-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\nayyer\appdata\local\temp\pip-build-5aaqii\pyldap\
    

1 个答案:

答案 0 :(得分:0)

$ sudo apt-get install libsasl2-dev libldap2-dev libssl-dev