Plone ldap 添加安装问题
Posted
技术标签:
【中文标题】Plone ldap 添加安装问题【英文标题】:Plone ldap add on installation issue 【发布时间】:2012-07-23 22:04:52 【问题描述】:我正在尝试让 ldap 身份验证在 Plone 4.2 版上工作。我已经在这个问题上敲了几个小时,但没有结果。我什至尝试过这些步骤:
-
安装python-ldap 2.6 (C:\Python26)
使用安装程序 (D:\Plone) 安装 Plone 4.2
在 EGG 和 ZCML 部分中使用 plone.app.ldap 编辑 buildout.cfg
在 D:\Plone\buildout-cache\eggs\ 中创建一个名为 python_ldap-2.3.12-py2.6.egg 的新文件夹
将 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
同时将C:\Python26\lib\site-packages\中的ldap文件夹复制到D:\Plone\buildout-cache\eggs\python_ldap-2.3.12-py2.6.egg\
还将文件 ldapurl.py 复制到 C:\Python26\lib\site-packages\ 到 D:\Plone\buildout-cache\eggs\python_ldap-2.3.12-py2.6.egg\
下一个副本:
文件夹: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
启动命令框并运行 bin\buildout
启动 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
我做错了什么?帮助将不胜感激
【问题讨论】:
【参考方案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 以重新安装 egg。
或者,您可以尝试安装系统 python-ldap
软件包(删除鸡蛋),然后看看 buildout 是否会选择它。
【讨论】:
我通过添加执行 bin/instance fg 命令后显示的错误来更新问题。这说明什么?谢谢 执行 rm -rf buildout-cache-eggs/python_ldap-2.3.12-py2.6.egg 命令,安装 OpenLDAP 2 库并再次运行 bin/buildout。它运行没有错误,但是我没有看到它再次安装 python-ldap。实际上,它给了我与我在问题中提到的相同的结果。我尝试再次运行 bin/instance fg,它给了我相同的结果。 也试过了。同样的问题:(。这是一次令人沮丧的经历。 对不起,这太令人沮丧了!我不知道为什么您的 python-ldap 安装会以这种方式失败。【参考方案2】:您需要安装 2 个库:
sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev
希望这会有所帮助。
【讨论】:
以上是关于Plone ldap 添加安装问题的主要内容,如果未能解决你的问题,请参考以下文章
在同一台 linux 机器上使用 zope-plone 安装 xampp 的指南?
plone.app.contenttypes 启用后集合分页失败