Plone ldap添加安装问题

时间:2012-07-23 22:04:53

标签: ldap plone buildout

我正在尝试将ldap身份验证用于Plone版本4.2。我已经在这个问题上敲了几个小时没有结果。我甚至尝试过这些步骤:

  1. 安装python-ldap 2.6(C:\ Python26)
  2. 使用安装程序(D:\ Plone)安装Plone 4.2
  3. 使用EGG和ZCML部分中的plone.app.ldap编辑buildout.cfg
  4. 在D:\ Plone \ buildout-cache \ eggs \
  5. 中创建一个名为python_ldap-2.3.12-py2.6.egg的新文件夹
  6. 将C:\ Python26 \ lib \ site-packages \ python_ldap-2.3.12-py2.6.egg-info复制到D:\ Plone \ buildout-cache \ eggs \ python_ldap-2.3.12-py2.6。 egg \并重命名为EGG-INFO
  7. 同时将C:\ Python26 \ lib \ site-packages \中的ldap文件夹复制到D:\ Plone \ buildout-cache \ eggs \ python_ldap-2.3.12-py2.6.egg \
  8. 同时将文件ldapurl.py复制到C:\ Python26 \ lib \ site-packages \到D:\ Plone \ buildout-cache \ eggs \ python_ldap-2.3.12-py2.6.egg \
  9. 下一份: 文件夹:C:\ Python26 \ lib \ site-packages \ python_ldap-2.3.12-py2.6.egg-info 文件夹:C:\ Python26 \ lib \ site-packages \ ldap 到D:\ Plone \ python \ Lib \ site-packages
  10. 启动命令框并运行bin \ buildout
  11. 启动Plone,以管理员身份登录,然后转到额外产品部分。在这里,您将找到LDAP产品。安装它并输入LDAP详细信息。
  12. 这些都没有真正帮助。当我尝试bin / buildout时,我收到以下消息:

    Installing instance.
    Getting distribution for 'dataflake.fakeldap'.
    zip_safe flag not set; analyzing archive contents...
    
    Installed /tmp/easy_install-oISsVG/dataflake.fakeldap-1.0/setuptools_git-0.4.2-py2.6.egg
    Got dataflake.fakeldap 1.0.
    Generated script '/usr/local/Plone/zinstance/bin/instance'.
    Installing zopepy.
    Generated interpreter '/usr/local/Plone/zinstance/bin/zopepy'.
    Installing zopeskel.
    Generated script '/usr/local/Plone/zinstance/bin/zopeskel'.
    Generated script '/usr/local/Plone/zinstance/bin/paster'.
    Updating backup.
    Updating chown.
    chown: Running 
    echo Dummy references to force this to execute after referenced parts
    echo /usr/local/Plone/zinstance/var/backups sudo -u plone
    chmod 600 .installed.cfg
    find /usr/local/Plone/zinstance/var -type d -exec chmod 700 {} \;
    chmod 744 /usr/local/Plone/zinstance/bin/*
    Dummy references to force this to execute after referenced parts
    /usr/local/Plone/zinstance/var/backups sudo -u plone
    Updating repozo.
    Updating unifiedinstaller.
    *************** PICKED VERSIONS ****************
    [versions]
    Products.LDAPMultiPlugins = 1.14
    Products.LDAPUserFolder = 2.23
    Products.PloneLDAP = 1.1
    collective.sendaspdf = 2.6
    dataflake.fakeldap = 1.0
    jquery.pyproxy = 0.4.1
    plone.app.ldap = 1.2.8
    
    *************** /PICKED VERSIONS ***************
    

    当我尝试bin / buildout时,它表示守护进程已启动并提供了一个id但是当我尝试localhost:8080时,它会显示“Problem loading page”并且页面无法加载。我尝试使用bin / instance fg来显示错误,并按照消息进行操作。

    bin/instance fg
    2012-07-24 08:53:18 INFO ZServer HTTP server started at Tue Jul 24 08:53:18 2012
            Hostname: 0.0.0.0
            Port: 8080
    2012-07-24 08:53:18 INFO Zope Set effective user to "plone"
    2012-07-24 08:53:19 WARNING SecurityInfo Conflicting security declarations for "setText"
    2012-07-24 08:53:19 WARNING SecurityInfo Class "ATTopic" had conflicting security declarations
    2012-07-24 08:53:19 ERROR Application Could not import Products.LDAPMultiPlugins
    Traceback (most recent call last):
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/OFS/Application.py", line 606, in import_product
        product=__import__(pname, global_dict, global_dict, silly)
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/__init__.py", line 22, in <module>
        from Products.LDAPMultiPlugins.LDAPMultiPlugin import addLDAPMultiPluginForm
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/LDAPMultiPlugin.py", line 29, in <module>
        from Products.LDAPUserFolder import manage_addLDAPUserFolder
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/__init__.py", line 20, in <module>
        from Products.LDAPUserFolder.LDAPUserFolder import LDAPUserFolder
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPUserFolder.py", line 52, in <module>
        from Products.LDAPUserFolder.LDAPDelegate import filter_format
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPDelegate.py", line 19, in <module>
        import ldap
      File "/usr/local/Plone/buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/__init__.py", line 22, in <module>
        from _ldap import *
    ImportError: No module named _ldap
    Traceback (most recent call last):
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/run.py", line 76, in <module>
        run()
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/run.py", line 22, in run
        starter.prepare()
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/__init__.py", line 86, in prepare
        self.startZope()
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/Startup/__init__.py", line 259, in startZope
        Zope2.startup()
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/__init__.py", line 47, in startup
        _startup()
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/Zope2/App/startup.py", line 67, in startup
        OFS.Application.import_products()
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/OFS/Application.py", line 583, in import_products
        import_product(product_dir, product_name, raise_exc=debug_mode)
      File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.13.15-py2.6.egg/OFS/Application.py", line 606, in import_product
        product=__import__(pname, global_dict, global_dict, silly)
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/__init__.py", line 22, in <module>
        from Products.LDAPMultiPlugins.LDAPMultiPlugin import addLDAPMultiPluginForm
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPMultiPlugins-1.14-py2.6.egg/Products/LDAPMultiPlugins/LDAPMultiPlugin.py", line 29, in <module>
        from Products.LDAPUserFolder import manage_addLDAPUserFolder
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/__init__.py", line 20, in <module>
        from Products.LDAPUserFolder.LDAPUserFolder import LDAPUserFolder
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPUserFolder.py", line 52, in <module>
        from Products.LDAPUserFolder.LDAPDelegate import filter_format
      File "/usr/local/Plone/buildout-cache/eggs/Products.LDAPUserFolder-2.23-py2.6.egg/Products/LDAPUserFolder/LDAPDelegate.py", line 19, in <module>
        import ldap
      File "/usr/local/Plone/buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/__init__.py", line 22, in <module>
        from _ldap import *
    ImportError: No module named _ldap
    

    我做错了什么?帮助将深受赞赏

2 个答案:

答案 0 :(得分:1)

您的扩建成功运行,那里没有问题。您选择的某些软件包未固定,因此您的buildout会报告它为您选择的版本。

您的服务器本身确实没有运行,因为您安装的Python LDAP egg似乎安装不正确。缺少buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/_ldap.so库文件。

删除整个鸡蛋(rm -rf buildout-cache-eggs/python_ldap-2.3.12-py2.6.egg)确保您的系统上安装了OpenLDAP 2.x库和标头(在Ubuntu和Debian上libldap2-dev应该足够)。然后重新运行buildout以重新安装鸡蛋。

或者,您可以尝试安装系统python-ldap包(删除鸡蛋),看看buildout是否选择了。

答案 1 :(得分:0)

您需要安装2个库:

sudo apt-get install libldap2-dev

sudo apt-get install libsasl2-dev

希望这会有所帮助。