1

LDAP認証をPloneバージョン4.2で動作させようとしています。私は何時間も問題にぶつかりましたが、結果はありませんでした。私もこれらの手順を試しました:

  1. python-ldap 2.6(C:\ Python26)をインストールします
  2. インストーラー(D:\ Plone)でPlone4.2をインストールする
  3. EGGおよびZCMLセクションでplone.app.ldapを使用してbuildout.cfgを編集します
  4. D:\ Plone \ buildout-cache \eggs\にpython_ldap-2.3.12-py2.6.eggという名前の新しいフォルダーを作成します
  5. 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に名前を変更
  6. また、C:\ Python26 \ lib \ site-packages \のldapフォルダーをD:\ Plone \ buildout-cache \ eggs \python_ldap-2.3.12-py2.6.egg\にコピーします。
  7. また、ファイルldapurl.pyをC:\ Python26 \ lib \ site-packages \からD:\ Plone \ buildout-cache \ eggs \python_ldap-2.3.12-py2.6.egg\にコピーします。
  8. 次のコピー:フォルダー: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-パッケージ
  9. コマンドボックスを起動し、bin\buildoutを実行します
  10. Ploneを起動し、管理者としてログインして、追加の製品セクションに移動します。ここにLDAP製品があります。インストールして、LDAPの詳細を入力します。

そのどれも本当に役に立ちませんでした。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を試すと、「ページの読み込みに問題があります」と表示され、ページが読み込まれません。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

私は何が間違っているのですか?深く感謝するのを手伝ってください

4

2 に答える 2

1

Your buildout ran successfully, there were no problems there. Some of the packages you picked were not pinned, so your buildout reported what versions it choose for you.

Your server itself is not indeed running because the Python LDAP egg you installed seems to be incorrectly installed. The buildout-cache/eggs/python_ldap-2.3.12-py2.6.egg/ldap/_ldap.so library file is missing.

Remove the whole egg (rm -rf buildout-cache-eggs/python_ldap-2.3.12-py2.6.egg) make sure you have the OpenLDAP 2.x library and headers installed on your system (on Ubuntu and Debian the libldap2-dev should be enough). Then re-run buildout to reinstall the egg.

Alternatively, you could try and install the system python-ldap package (remove the egg) and see if buildout picks that up instead.

于 2012-07-24T07:14:55.783 に答える
0

2つのライブラリをインストールする必要があります。

sudo apt-get install libldap2-dev

sudo apt-get install libsasl2-dev

それがお役に立てば幸いです。

于 2013-07-26T08:08:14.490 に答える