Any CentOS plone developers out there wanna help us figure out the dependencies list? Please help us update the quickstart buildout with the dependencies list at http://www.cynapse.com/[…]/quickstart-buildout
I have a customer that wants to deploy cyn.in onto a Virtual Private Server that is centos based so I spent a little time going through a test install. This may assist others trying to get a compile from source option going. For the most part, i followed the Ubuntu quickstart guide for package references. Note: I am not a python developer so there may be easier ways to fix the couple bugs. This setup worked on Centos 5.4 x86.
The important piece to this install is that python-ldap 2.3.10 has a bug that will cause it to fail compilation on Centos5 with its current openldap libs. This was fixed in python-ldap 2.3.11.
In any case, hopefully this will assist others in getting Centos/RHEL installs going:
Do a base install of CentOS 5.4 (customize package list and deselect everything except 'base system'). Turned off selinux and firewall and rebooted (this part isn't really necessary, I just did it to be sure selinux didn't get in the way while I was figuring out packages).
The ubuntu install notes say to grab packages: build-essential libssl-dev libjpeg62-dev libreadline5-dev wv libxml2-dev libxslt1-dev libsasl2-dev poppler-utils libdb4.4-dev libldap2-dev python2.4-dev
gcc g++ libc6-dev (i'm assuming this is covered by glibc-devel) zlib1g-dev - zlib-1.2.3-3 and zlib-devel-1.2.3-3 should be installed in base. python-imaging subversion python-ldap python-setuptools
Base install of Centos5.4 should have: openssl-0.9.8.e-12 libjpeg-6b-37 readline-5.1-3 libxml2-2.6.26-2.1.2.8 libxml2-python-2.6.26-2.1.2.8 libxslt-1.1.17-2 will be installed when libgsf is installed. cyrus-sasl-2.1.22-5 db4-4.3.29-10 openldap-2.3.43-3.el5 python-2.4.3-27
Use yum to install most the missing packages and in one case, you will need to get 'wv' from an external source. ######### yum install openssl-devel libjpeg-devel readline-devel libgsf libxml2-devel libxslt-devel cyrus-sasl-devel poppler poppler-utils db4-devel openldap-devel python-devel gcc gcc-c++ glibc-devel python-imaging subversion python-ldap python-setuptools cvs
The following shows each command in the above yum line run singly and the dependencies it pulls in: #########
yum install openssl-devel # pulled in for dependencies: e2fsprogs-devel i386 1.39-23.el5 base 568 k keyutils-libs-devel i386 1.2-1.el5 base 27 k krb5-devel i386 1.6.1-36.el5_4.1 updates 1.8 M libselinux-devel i386 1.33.4-5.5.el5 base 143 k libsepol-devel i386 1.15.2-2.el5 base 187 k zlib-devel i386 1.2.3-3 base 101 k
yum install libjpeg-devel
yum install readline-devel #pulled in for dependency libtermcap-devel i386 2.0.8-46.1 base 56 k
yum install libgsf (this packaged is needed for the wv install, it will pull in a lot of gnome stuff) # pulled in by libgsf: alsa-lib i386 1.0.17-1.el5 base 412 k audiofile i386 1:0.2.6-5 base 107 k avahi-glib i386 0.6.16-6.el5 base 15 k esound i386 1:0.2.36-3 base 129 k gnome-keyring i386 0.6.0-1.fc6 base 170 k gnome-mime-data i386 2.4.2-3.1 base 690 k gnome-mount i386 0.5-3.el5 base 70 k gnome-vfs2 i386 2.16.2-4.el5 base 1.3 M libart_lgpl i386 2.3.17-4 base 76 k libbonobo i386 2.16.0-1.fc6 base 501 k libbonoboui i386 2.16.0-1.fc6 base 389 k libglade2 i386 2.6.0-2 base 96 k libgnome i386 2.16.0-6.el5 base 858 k libgnomecanvas i386 2.14.0-4.1 base 222 k libgnomeui i386 2.16.0-5.el5 base 978 k libxslt i386 1.1.17-2.el5_2.2 base 485 k shared-mime-info i386 0.19-5.el5 base 148 k
yum install libxml2-devel #pulled in for dependency pkgconfig i386 1:0.21-2.el5 base 59 k
yum install libxslt-devel #pulled in for dependency libgcrypt-devel i386 1.4.4-5.el5 base 396 k libgpg-error-devel i386 1.4-2 base 17 k
yum install cyrus-sasl-devel
yum install poppler poppler-utils
yum install db4-devel
yum install openldap-devel
yum install python-devel
yum install gcc #installed for dependencies: cpp i386 4.1.2-46.el5_4.2 updates 2.6 M glibc-devel i386 2.5-42.el5_4.3 updates 2.0 M glibc-headers i386 2.5-42.el5_4.3 updates 601 k kernel-headers i386 2.6.18-164.11.1.el5 updates 1.0 M libgomp i386 4.4.0-6.el5 base 70 k
yum install gcc-c++ #installed for dependencies libstdc++-devel i386 4.1.2-46.el5_4.2 updates 2.8 M
yum install glibc-devel (this should have already been installed by gcc)
yum install python-imaging #Installing for dependencies: tix i386 1:8.4.0-11.fc6 base 329 k tk i386 8.4.13-5.el5_1.1 base 888 k tkinter i386 2.4.3-27.el5 base 275 k
yum install subversion #Installing for dependencies: apr i386 1.2.7-11.el5_3.1 base 123 k apr-util i386 1.2.7-7.el5_3.2 base 76 k neon i386 0.25.5-10.el5_4.1 updates 101 k perl-URI noarch 1.35-3 base 116 k postgresql-libs i386 8.1.18-2.el5_4.1 updates 196 k
yum install python-ldap
yum install python-setuptools
yum install cvs (we'll use cvs later to get python-ldap)
##################################
That should get everything prepped to handle the build of cynin.
At this time, cynin requires python-ldap 2.3.10. The python 2.3.10 distribution from Oct 30 2009 has a bug in it that effects current CentOS distributions (as well as earlier gentoo setups with older openldap libs). From the python-ldap readme: ####### Released 2.3.11 2010-02-xx
Changes since 2.3.10:
Modules/ * Make use of LDAP_OPT_X_TLS_NEWCTX only if available in OpenLDAP libs used for the build * Fixed #ifdef-statements for OPT_X_TLS_PROTOCOL_MIN #######
In 2.3.10, it assumes it can make us of LDAP_OPT_X_TLS_NEWCTX even though this is available in older openldap libs and the build will error out if using ~/venv/bin/easy_install-2.4 python-ldap method outlined in the normal build doc. So what we will do until this is fixed is download the current 2.3.11 release, compile it as if it is 2.3.10 and then manually move the egg directory into the build structure we'll setup shortly.
cd python-ldap (there is a new python-ldap under the directory we are in). sudo python setup.py clean sudo python setup.py install
This creates an egg in /usr/lib/python2.4/site-packages for the new package called python_ldap-2.3.11-py2.4-linux-i686.egg
We need it to think this is a 2.3.10 file, so we are going to change the version in the source. Edit ./Lib/ldap/__init__.py and find the version line (its near the top), it is currently set to 2.3.11. Change it to 2.3.10.
Rerun the clean and install steps earlier, it should create a python_ldap-2.3.10-py2.4-linux-i686.egg this time.
This should get the cynin source files down into a cynin_3_1 subdirectory.
Edit the user.cfg and change the username to be your username that you are compiling this as. ****NOTE: The fact that the user.cfg should be edited to have the username changed should be put into the quickstart guide. Someone who's never looked at cynin (ie, Me) could miss this step.
If this isn't done, the 'real' 2.3.10 install will try to get downloaded and it will bug out saying: Modules/constants.c: In function ‘LDAPinit_constants’: Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_NEWCTX’ undeclared (first use in this function) Modules/constants.c:184: error: (Each undeclared identifier is reported only once Modules/constants.c:184: error: for each function it appears in.)
And watch for the 'INFO Zope Ready to handle requests' line.
Assuming it comes up, the rest of the getting started doc applies as written in the README.txt, I followed the rest as written there:
Navigate to http://localhost:8080 (if you use the same computer as desktop) or substitute the localhost with the hostname (or even the IP address) of the computer that zope/cyn.in is running on.
You should see the "Zope quick start screen". Cool, you can access your newly built Zope server. Next, navigate to http://localhost:8080/manage .
This will give you an HTTP basic auth request. Use the following credentials to get in: username: admin password: secret
You will see the standard Zope management interface. On the right you will see a drop down list, next to a button labeled 'Add'.
From the list, scroll down and select "Plone Site", and you'll get the Add Plone Site screen. Type in an ID for the plone site (I recommend cynin) and hit the Add Plone Site button - do not change anything else.
This will take some time, if you're feeling geeky you can watch the scrolling text in your fg command line window to see what's going on.
After some time your browser will arrive back at the zope management screen, with one major difference, you'll see a new entry in the left tree view as well as in the center list, cynin (Site). Great, you've succeeded in adding a new plone site. Click on it.
Now, scroll down, and find the item called portal_quickinstaller (Allows to install/uninstall products) and click on that.
You'll get a list of installable products, among these check the checkbox next to the item labeled "Ubify Site Policy" and hit the Install button. Do NOT check any other item.
Again, this will take some time and you can watch the scrolling progress in your fg command line window. When it completes, the list will refresh where most of the items will have moved down to the "Installed Products" section.
Great, you don't know it yet, but you've managed to get a working cyn.in installation built out of source! :)
If you don't like doing as recommended and chose a different ID during Plone Site creation, substitue your ID in place of cyin in the above URL, of course.
After some moments of tense waiting, the familiar cyn.in login screen should greet you and you can get in by using the following standard credentials:
Are you *sure* you're running a "normal" Cyn.in buildout? Please tell us if you've made any changes because what's happening..... shouldn't!
I ask this because from the paste, it looks like you're having problems importing the standard Object events that come from Zope lifecycle. These have changed with Plone 4, but everything before does have it at the places it's being accessed at, and should work. If you *need* those imports to work in your current buildout, you'll have to go to the files being pointed out in the paste, and change the imports to the new ones.
It doesn't really look like you're having the normal LDAP dependency problems, but you still could be. If you don't need LDAP to work for your needs, you can simply re-buildout with the provided noldap.cfg file by running "./bin/buildout -c noldap.cfg -v" in the /home/cynin/buildout folder to eliminate ldap altogether from the buildout.
"2010-03-27 21:38:26 INFO Marshall libxml2-python not available. Unable to register libxml2 based marshallers," that jumped out at me. Is the libxml2-python rpm installed? (check by doing the following: rpm -qa |grep libxml2-python
It should kick back the rpm name (example from a centos 5.4 box): [millisa@monster ~]$ rpm -qa |grep libxml2-python libxml2-python-2.6.26-2.1.2.8 [millisa@monster ~]$
)
It is usually in the 'base' set, if you did a completely bare install, it might not be there. You can install it with yum: sudo yum install libxml2-python it should be in the distribution repos.
dhiraj : Yes I'm using "Cyn.in Community Edition Source - v3.1.1", I think it is the right version. But I'll try to get everything from scratch again and see what happens. millisa : Yes it is installed, no idea why it is not available at run time, maybe some weird behavior with the venv, but I'm pretty sure I created the venv after installing all the dependencies.
I built again from scratch, after a yum update to be sure to get the latest versions First weird thing : indeed libxml2-python does not get installed, I had to copy it myself to the venv. But I still get the same error http://paste.lisp.org/+230D I really need to install in CentOS because this machine hosts other solution and the domain name is bound to it, and last but not least, I don't like debian.
I'd like the help of someone being able to install this on CentOS
So we've got it down to at least the LDAP dependencies, and now it's a matter of figuring out which one it is. Try making sure of these dependencies (and their versions):
I'll try to run through the install again this weekend on a test virtual just to validate it; maybe there was an RPM update that's breaking things since that first attempt I did 6 weeks ago. I'll take a stab at making the instructions a bit cleaner, too. That attempt above was on a 32 bit centos 5.4 setup; want me to try it on a 64 bit install?
Good news/bad news. It looks like the workaround for the python-ldap I did above isn't needed anymore. python-ldap-2.3.11 is pulled in now on centos and ~/venv/bin/easy_install-2.4 python-ldap can be used, just like in the ubuntu docs.
Not so good news: I still had the virtual that has the working cynin compile that I based the first doc on. I resetup the virtualenv, and recompiled the same svn checkout that I grabbed back then (cynin_3_1, 3285) and verified it would still start the instance. If I grab cynin 3_1_2 (3305), it looks like it builds, but it has the same issue as ybizeul is seeing when trying to run it.
2010-04-02 08:04:00 ERROR Application Couldn't install Five Traceback (most recent call last): File "/home/outserv/cynin20100402/cynin_3_1_2/parts/zope2/lib/python/OFS/Application.py", line 786, in install_product initmethod(context)
I tried moving the 3285 checkout to a new centos virtual and it tested ok there.
So on the plus side, the setup looks like it'll be much simpler:
Grab the cynin src, and then do the same buildout as Ubuntu.
Last time when I was trying to get the centos setup working, I ended up running through the install on ubuntu 9.10 i386 to compare. This time I'm running into the same error with what's currently in SVN, using an ubuntu 9.10 i386 server install, following the quick buildout.
millisa : If I resume : You get the same error as me on CentOS AND Ubuntu with latest SVN checkout ? But you succeed installing cynin_3_1, 3285 ? What build is 3.1.1 available from the front page ?
Hmm.... I noticed from your trace log that plone.app.ldap latest (1.2) is being auto-picked up from PyPI. This has just recently been released at end of last month (after approx 1.5 years!) so it might just be breaking things up, ATM.
Try pinning the version of plone.app.ldap in buildout:
At around line 86 you'll find [cyninldap] section in buildout.cfg. In this change it from this: =========== [cyninldap] eggs = plone.app.ldap bda.ldap =================
Woo. I disappear for a month and it's all better. Good job.
I downloaded the 3.1.3 src on a fresh virtual to test and things went smoothly. I followed the new quickstart buildout at http://www.cynapse.com/[…]/quickstart-buildout , after satisfying dependencies the RedHat/CentOS way:
The following should work for CentOS 5.4 x86 for the 'Cyn.in Dependency installation using Package Managers' section:
With that, I could follow the quickstart buildout as written from the 'Make a new virtualenv for your login' section. I would still mention editing the user.cfg's effective-user entry somewhere in the quickstart.
I try to install python-ldap on Centos but it fail, any one know how to fix it ?
~/venv/bin/easy_install-2.4 python-ldap Searching for python-ldap Reading http://pypi.python.org/simple/python-ldap/ Reading http://www.python-ldap.org/ Reading http://python-ldap.sourceforge.net/ Reading http://sourceforge.net/proj[…]id=2072&package_id=2011 Best match: python-ldap 2.3.12 Downloading http://pypi.python.org/pack[…]521b2c2590d9b033894ba5c6f31 Processing python-ldap-2.3.12.tar.gz Running python-ldap-2.3.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mG2tkc/python-ldap-2.3.12/egg-dist-tmp-XdwZ4B extra_compile_args: extra_objects: include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl library_dirs: /usr/local/openldap-2.3/lib libs: ldap_r lber sasl2 ssl crypto file Lib/ldap.py (for module ldap) not found file Lib/ldap/schema.py (for module ldap.schema) not found warning: no files found matching 'Makefile' warning: no files found matching 'Modules/LICENSE' file Lib/ldap.py (for module ldap) not found file Lib/ldap/schema.py (for module ldap.schema) not found file Lib/ldap.py (for module ldap) not found file Lib/ldap/schema.py (for module ldap.schema) not found Modules/constants.c: In function ‘LDAPinit_constants’: Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_CRLFILE’ undeclared (first use in this function) Modules/constants.c:184: error: (Each undeclared identifier is reported only once Modules/constants.c:184: error: for each function it appears in.) error: Setup script exited with error: command 'gcc' failed with exit status 1
what you need to do is , 1) down load the source package for python-ldap - wget http://pypi.python.org/[…]/python-ldap-2.3.12.tar.gz 2) tar -zxvf python-ldap-2.3.12.tar.gz 3) cd python-ldap-2.3.12 4) python setup.py install 5) cp -r /usr/lib/python2.4/site-packages/python_ldap-2.3.12-py2.4-linux-i686.egg/ ~/venv/lib/python2.4/site-packages/
I was getting same problem for odict as well, and just follwoed same steps for odict. yes, you havet o touch README.rst , in odict's source dir else it fails to install
when running ./bin/instance fg, I get the following error: *** python: /builddir/build/BUILD/Python-2.7/Objects/typeobject.c:1728: extra_ivars: Assertion `t_size >= b_size' failed. Aborted *** Any ideas? Thanks!
Looks like plone doesn't support python v2.7. What's the latest python version you guys got this to work with? Do I really have to go all the way back to 2.4.4?? Thank you!
I am also running into trouble with CentOS 5: I installed the packages listed above, Zope is also starting. However, when I try to add the Plone site to Zope, I get the error below. Can anybody shed some light on this?
Thanks.
Error message in Browser: --------------------- Site Error An error was encountered while publishing this resource
ErrorType: AttributeError Error Value: 'NoneType' object has no attribute 'getName' ------------------------ Terminal output contains: .... Module Products.ATContentTypes.content.document, line 204, in getTidyOutput AttributeError 'NoneType' object has no attribute 'getName' Unhandled exception in thread started by <class ZServer.PubCore.ZServerPublisher.ZServerPublisher at 0xb7760e0c> Traceback: File "[...]/parts/zope2/lib/python/ZPublisher/Publish.py", line 401, in publish_module .... File "[...]/parts/zope2/lib/python/zope/component/registry.py", line 290, in subscribers return self.adapters.subscribers(objects, provided) AttributeError: adapters
I had to include several specific versions in buildout.cfg, but finally got the buildout to work. Now when I run ./bin/instance fg, I get the following error:
$ ./bin/instance fg Traceback (most recent call last): File "./bin/instance", line 205, in ? import plone.recipe.zope2instance.ctl File "/home/livewire/Downloads/cynin313-source-snapshot/eggs/plone.recipe.zope2instance-3.6-py2.4.egg/plone/recipe/zope2instance/ctl.py", line 34, in ? from Zope2.Startup import zopectl File "/home/livewire/Downloads/cynin313-source-snapshot/eggs/Zope2-2.13.9-py2.4.egg/Zope2/Startup/zopectl.py", line 328 finally: ^ SyntaxError: invalid syntax
on line 328 zopectl.py uses try...except...finally structure which is valid only from python 2.5, but cynin requires us to use python 2.4? Any help on this one?
Thanks!
The important piece to this install is that python-ldap 2.3.10 has a bug that will cause it to fail compilation on Centos5 with its current openldap libs. This was fixed in python-ldap 2.3.11.
In any case, hopefully this will assist others in getting Centos/RHEL installs going:
Do a base install of CentOS 5.4 (customize package list and deselect everything except 'base system').
Turned off selinux and firewall and rebooted (this part isn't really necessary, I just did it to be sure selinux didn't get in the way while I was figuring out packages).
The ubuntu install notes say to grab packages:
build-essential
libssl-dev
libjpeg62-dev
libreadline5-dev
wv
libxml2-dev
libxslt1-dev
libsasl2-dev
poppler-utils
libdb4.4-dev
libldap2-dev
python2.4-dev
gcc
g++
libc6-dev (i'm assuming this is covered by glibc-devel)
zlib1g-dev - zlib-1.2.3-3 and zlib-devel-1.2.3-3 should be installed in base.
python-imaging
subversion
python-ldap
python-setuptools
Base install of Centos5.4 should have:
openssl-0.9.8.e-12
libjpeg-6b-37
readline-5.1-3
libxml2-2.6.26-2.1.2.8
libxml2-python-2.6.26-2.1.2.8
libxslt-1.1.17-2 will be installed when libgsf is installed.
cyrus-sasl-2.1.22-5
db4-4.3.29-10
openldap-2.3.43-3.el5
python-2.4.3-27
Use yum to install most the missing packages and in one case, you will need to get 'wv' from an external source.
#########
yum install openssl-devel libjpeg-devel readline-devel libgsf libxml2-devel libxslt-devel cyrus-sasl-devel poppler poppler-utils db4-devel openldap-devel python-devel gcc gcc-c++ glibc-devel python-imaging subversion python-ldap python-setuptools cvs
Obtain the wv package from the Dag repository: http://dag.wieers.com/rpm/packages/wv/
wget http://dag.wieers.com/[…]/wv-1.2.4-1.el5.rf.i386.rpm
sudo rpm -ivh wv-1.2.4-1.el5.rf.i386.rpm
The following shows each command in the above yum line run singly and the dependencies it pulls in:
#########
yum install openssl-devel
# pulled in for dependencies:
e2fsprogs-devel i386 1.39-23.el5 base 568 k
keyutils-libs-devel i386 1.2-1.el5 base 27 k
krb5-devel i386 1.6.1-36.el5_4.1 updates 1.8 M
libselinux-devel i386 1.33.4-5.5.el5 base 143 k
libsepol-devel i386 1.15.2-2.el5 base 187 k
zlib-devel i386 1.2.3-3 base 101 k
yum install libjpeg-devel
yum install readline-devel
#pulled in for dependency
libtermcap-devel i386 2.0.8-46.1 base 56 k
yum install libgsf
(this packaged is needed for the wv install, it will pull in a lot of gnome stuff)
# pulled in by libgsf:
alsa-lib i386 1.0.17-1.el5 base 412 k
audiofile i386 1:0.2.6-5 base 107 k
avahi-glib i386 0.6.16-6.el5 base 15 k
esound i386 1:0.2.36-3 base 129 k
gnome-keyring i386 0.6.0-1.fc6 base 170 k
gnome-mime-data i386 2.4.2-3.1 base 690 k
gnome-mount i386 0.5-3.el5 base 70 k
gnome-vfs2 i386 2.16.2-4.el5 base 1.3 M
libart_lgpl i386 2.3.17-4 base 76 k
libbonobo i386 2.16.0-1.fc6 base 501 k
libbonoboui i386 2.16.0-1.fc6 base 389 k
libglade2 i386 2.6.0-2 base 96 k
libgnome i386 2.16.0-6.el5 base 858 k
libgnomecanvas i386 2.14.0-4.1 base 222 k
libgnomeui i386 2.16.0-5.el5 base 978 k
libxslt i386 1.1.17-2.el5_2.2 base 485 k
shared-mime-info i386 0.19-5.el5 base 148 k
wv - get this package from the dag repository: http://dag.wieers.com/rpm/packages/wv/
http://dag.wieers.com/[…]/wv-1.2.4-1.el5.rf.i386.rpm
rpm -ivh wv-1.2.4-1.el5.rf.i386.rpm
yum install libxml2-devel
#pulled in for dependency
pkgconfig i386 1:0.21-2.el5 base 59 k
yum install libxslt-devel
#pulled in for dependency
libgcrypt-devel i386 1.4.4-5.el5 base 396 k
libgpg-error-devel i386 1.4-2 base 17 k
yum install cyrus-sasl-devel
yum install poppler poppler-utils
yum install db4-devel
yum install openldap-devel
yum install python-devel
yum install gcc
#installed for dependencies:
cpp i386 4.1.2-46.el5_4.2 updates 2.6 M
glibc-devel i386 2.5-42.el5_4.3 updates 2.0 M
glibc-headers i386 2.5-42.el5_4.3 updates 601 k
kernel-headers i386 2.6.18-164.11.1.el5 updates 1.0 M
libgomp i386 4.4.0-6.el5 base 70 k
yum install gcc-c++
#installed for dependencies
libstdc++-devel i386 4.1.2-46.el5_4.2 updates 2.8 M
yum install glibc-devel
(this should have already been installed by gcc)
yum install python-imaging
#Installing for dependencies:
tix i386 1:8.4.0-11.fc6 base 329 k
tk i386 8.4.13-5.el5_1.1 base 888 k
tkinter i386 2.4.3-27.el5 base 275 k
yum install subversion
#Installing for dependencies:
apr i386 1.2.7-11.el5_3.1 base 123 k
apr-util i386 1.2.7-7.el5_3.2 base 76 k
neon i386 0.25.5-10.el5_4.1 updates 101 k
perl-URI noarch 1.35-3 base 116 k
postgresql-libs i386 8.1.18-2.el5_4.1 updates 196 k
yum install python-ldap
yum install python-setuptools
yum install cvs
(we'll use cvs later to get python-ldap)
##################################
That should get everything prepped to handle the build of cynin.
At this time, cynin requires python-ldap 2.3.10. The python 2.3.10 distribution from Oct 30 2009 has a bug in it that effects current CentOS distributions (as well as earlier gentoo setups with older openldap libs). From the python-ldap readme:
#######
Released 2.3.11 2010-02-xx
Changes since 2.3.10:
Modules/
* Make use of LDAP_OPT_X_TLS_NEWCTX only if available in
OpenLDAP libs used for the build
* Fixed #ifdef-statements for OPT_X_TLS_PROTOCOL_MIN
#######
In 2.3.10, it assumes it can make us of LDAP_OPT_X_TLS_NEWCTX even though this is available in older openldap libs and the build will error out if using ~/venv/bin/easy_install-2.4 python-ldap method outlined in the normal build doc. So what we will do until this is fixed is download the current 2.3.11 release, compile it as if it is 2.3.10 and then manually move the egg directory into the build structure we'll setup shortly.
mkdir ~/python-ldap
cd ~/python-ldap
Grab the current source from cvs (after installing cvs with yum install cvs)
cvs -d:pserver:anonymous@python-ldap.cvs.sourceforge.net:/cvsroot/python-ldap login
(hit enter on password, leaving it blank)
cvs -z3 -d:pserver:anonymous@python-ldap.cvs.sourceforge.net:/cvsroot/python-ldap co -P python-ldap
cd python-ldap
(there is a new python-ldap under the directory we are in).
sudo python setup.py clean
sudo python setup.py install
This creates an egg in /usr/lib/python2.4/site-packages for the new package called python_ldap-2.3.11-py2.4-linux-i686.egg
We need it to think this is a 2.3.10 file, so we are going to change the version in the source.
Edit ./Lib/ldap/__init__.py
and find the version line (its near the top), it is currently set to 2.3.11. Change it to 2.3.10.
Rerun the clean and install steps earlier, it should create a python_ldap-2.3.10-py2.4-linux-i686.egg this time.
sudo python setup.py clean
sudo python setup.py install
We'll copy that 2.3.10 egg dir into the virtual environment we setup below.
Go back to your user dir
cd ~
Make a place to download the cynin source from svn:
mkdir cyninsrc
cd cyninsrc
svn co http://odn.cynapse.com/svn/cynin/tags/cynin_3_1
This should get the cynin source files down into a cynin_3_1 subdirectory.
Edit the user.cfg and change the username to be your username that you are compiling this as.
****NOTE: The fact that the user.cfg should be edited to have the username changed should be put into the quickstart guide. Someone who's never looked at cynin (ie, Me) could miss this step.
#This gets our virtual environment setup
sudo python2.4 ez_setup.py
sudo easy_install-2.4 virtualenv
virtualenv --python=python2.4 -v --no-site-packages ~/venv
~/venv/bin/easy_install-2.4 ZopeSkel
~/venv/bin/easy_install-2.4 lxml
Instead of doing easy install of python-ldap like in the docs, ~/venv/bin/easy_install-2.4 python-ldap, copy the egg we made earlier.
copy the egg dir we made earlier from /usr/lib/python2.4/site-packages to ~/venv/lib/python2.4/site-packages/
cp -r /usr/lib/python2.4/site-packages/python_ldap-2.3.10-py2.4-linux-i686.egg ~/venv/lib/python2.4/site-packages/
If this isn't done, the 'real' 2.3.10 install will try to get downloaded and it will bug out saying:
Modules/constants.c: In function ‘LDAPinit_constants’:
Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_NEWCTX’ undeclared (first use in this function)
Modules/constants.c:184: error: (Each undeclared identifier is reported only once
Modules/constants.c:184: error: for each function it appears in.)
The rest should go like the ubuntu documentation:
~/venv/bin/easy_install-2.4 -i http://dist.serverzen.com/pypi/simple PILwoTk
~/venv/bin/python2.4 bootstrap.py
Make sure you are in your cyninsrc directory:
./bin/buildout -c user.cfg
Then run:
./bin/instance fg
And watch for the 'INFO Zope Ready to handle requests' line.
Assuming it comes up, the rest of the getting started doc applies as written in the README.txt, I followed the rest as written there:
Navigate to http://localhost:8080 (if you use the same computer as desktop) or
substitute the localhost with the hostname (or even the IP address) of the
computer that zope/cyn.in is running on.
You should see the "Zope quick start screen". Cool, you can access your newly
built Zope server. Next, navigate to http://localhost:8080/manage .
This will give you an HTTP basic auth request. Use the following credentials
to get in:
username: admin
password: secret
You will see the standard Zope management interface. On the right you will see
a drop down list, next to a button labeled 'Add'.
From the list, scroll down and select "Plone Site", and you'll get the Add Plone
Site screen. Type in an ID for the plone site (I recommend cynin) and hit the
Add Plone Site button - do not change anything else.
This will take some time, if you're feeling geeky you can watch the scrolling
text in your fg command line window to see what's going on.
After some time your browser will arrive back at the zope management screen, with
one major difference, you'll see a new entry in the left tree view as well as
in the center list, cynin (Site).
Great, you've succeeded in adding a new plone site. Click on it.
Now, scroll down, and find the item called portal_quickinstaller (Allows to
install/uninstall products) and click on that.
You'll get a list of installable products, among these check the checkbox next
to the item labeled "Ubify Site Policy" and hit the Install button. Do NOT check
any other item.
Again, this will take some time and you can watch the scrolling progress in your
fg command line window. When it completes, the list will refresh where most of
the items will have moved down to the "Installed Products" section.
Great, you don't know it yet, but you've managed to get a working cyn.in
installation built out of source! :)
Let's get to proving that: In your browser, type up the following address:
http://localhost:8080/cynin
If you don't like doing as recommended and chose a different ID during Plone
Site creation, substitue your ID in place of cyin in the above URL, of course.
After some moments of tense waiting, the familiar cyn.in login screen should
greet you and you can get in by using the following standard credentials:
username: siteadmin
password: secret
http://paste.lisp.org/+22TJ
I ask this because from the paste, it looks like you're having problems importing the standard Object events that come from Zope lifecycle. These have changed with Plone 4, but everything before does have it at the places it's being accessed at, and should work. If you *need* those imports to work in your current buildout, you'll have to go to the files being pointed out in the paste, and change the imports to the new ones.
It doesn't really look like you're having the normal LDAP dependency problems, but you still could be. If you don't need LDAP to work for your needs, you can simply re-buildout with the provided noldap.cfg file by running "./bin/buildout -c noldap.cfg -v" in the /home/cynin/buildout folder to eliminate ldap altogether from the buildout.
that jumped out at me. Is the libxml2-python rpm installed? (check by doing the following:
rpm -qa |grep libxml2-python
It should kick back the rpm name (example from a centos 5.4 box):
[millisa@monster ~]$ rpm -qa |grep libxml2-python
libxml2-python-2.6.26-2.1.2.8
[millisa@monster ~]$
)
It is usually in the 'base' set, if you did a completely bare install, it might not be there. You can install it with yum:
sudo yum install libxml2-python
it should be in the distribution repos.
millisa : Yes it is installed, no idea why it is not available at run time, maybe some weird behavior with the venv, but I'm pretty sure I created the venv after installing all the dependencies.
First weird thing : indeed libxml2-python does not get installed, I had to copy it myself to the venv.
But I still get the same error http://paste.lisp.org/+230D
I really need to install in CentOS because this machine hosts other solution and the domain name is bound to it, and last but not least, I don't like debian.
I'd like the help of someone being able to install this on CentOS
So we've got it down to at least the LDAP dependencies, and now it's a matter of figuring out which one it is. Try making sure of these dependencies (and their versions):
libsasl2-dev
libssl-dev
python-ldap
libdb-dev
libldap2-dev
Your paste still says things it shouldn't like above about ObjectRemoved event, though. Weird.
Millisa : I'm using a 32 bit 5.4 installation as well, I really appreciate your help
Next step is to install a CentOS from scratch and start again
~/venv/bin/easy_install-2.4 python-ldap
can be used, just like in the ubuntu docs.
Not so good news: I still had the virtual that has the working cynin compile that I based the first doc on. I resetup the virtualenv, and recompiled the same svn checkout that I grabbed back then (cynin_3_1, 3285) and verified it would still start the instance. If I grab cynin 3_1_2 (3305), it looks like it builds, but it has the same issue as ybizeul is seeing when trying to run it.
2010-04-02 08:04:00 ERROR Application Couldn't install Five
Traceback (most recent call last):
File "/home/outserv/cynin20100402/cynin_3_1_2/parts/zope2/lib/python/OFS/Application.py", line 786, in install_product
initmethod(context)
I tried moving the 3285 checkout to a new centos virtual and it tested ok there.
So on the plus side, the setup looks like it'll be much simpler:
sudo yum install openssl-devel libjpeg-devel readline-devel libgsf libxml2-devel libxslt-devel cyrus-sasl-devel poppler poppler-utils db4-devel openldap-devel python-devel gcc gcc-c++ glibc-devel python-imaging subversion python-ldap python-setuptools cvs wget libpng
It should pull in about ~72 packages (some like cvs probably aren't needed anymore)
wget http://dag.wieers.com/[…]/wv-1.2.4-1.el5.rf.i386.rpm
sudo rpm -ivh wv-1.2.4-1.el5.rf.i386.rpm
Grab the cynin src, and then do the same buildout as Ubuntu.
Last time when I was trying to get the centos setup working, I ended up running through the install on ubuntu 9.10 i386 to compare. This time I'm running into the same error with what's currently in SVN, using an ubuntu 9.10 i386 server install, following the quick buildout.
http://millisa.arcadium.org/cynin/ubuntu_910_cynin.txt
I starts at the point user.cfg is edited for the effective user and shows all steps up to and including running ./bin/instance fg.
I figure if someone can spot what's wrong there on the ubuntu side, I can make it work on the centos side.
But you succeed installing cynin_3_1, 3285 ?
What build is 3.1.1 available from the front page ?
Try pinning the version of plone.app.ldap in buildout:
At around line 86 you'll find [cyninldap] section in buildout.cfg.
In this change it from this:
===========
[cyninldap]
eggs =
plone.app.ldap
bda.ldap
=================
to look like this:
===============
[cyninldap]
eggs =
plone.app.ldap==1.1
bda.ldap
===============
Then, remove .installed.cfg and re-buildout and see if the errors continue?
You did it :-)
Zope is now listening requests, I can go on !
Thank you very much
Hmm.... pinning it as a cautionary measure in the svn buildout as well. Will investigate what's going on with that 1.2 version and update soon.
ImportError: No module named ImplPython
I don't understand why I only had english language effective, tried this....
I try to re-install everything over again and see if it works
I downloaded the 3.1.3 src on a fresh virtual to test and things went smoothly. I followed the new quickstart buildout at http://www.cynapse.com/[…]/quickstart-buildout , after satisfying dependencies the RedHat/CentOS way:
The following should work for CentOS 5.4 x86 for the 'Cyn.in Dependency installation using Package Managers' section:
sudo yum install openssl-devel libjpeg-devel readline-devel libgsf libxml2-devel libxslt-devel cyrus-sasl-devel poppler poppler-utils db4-devel openldap-devel python-devel gcc gcc-c++ glibc-devel python-imaging subversion python-ldap python-setuptools cvs
Obtain the wv package from the Dag repository: http://dag.wieers.com/rpm/packages/wv/
wget http://dag.wieers.com/[…]/wv-1.2.4-1.el5.rf.i386.rpm
sudo rpm -ivh wv-1.2.4-1.el5.rf.i386.rpm
With that, I could follow the quickstart buildout as written from the 'Make a new virtualenv for your login' section. I would still mention editing the user.cfg's effective-user entry somewhere in the quickstart.
I've also now added both points to the quickstart buildout dependencies list.
I try to install python-ldap on Centos but it fail, any one know how to fix it ?
~/venv/bin/easy_install-2.4 python-ldap
Searching for python-ldap
Reading http://pypi.python.org/simple/python-ldap/
Reading http://www.python-ldap.org/
Reading http://python-ldap.sourceforge.net/
Reading http://sourceforge.net/proj[…]id=2072&package_id=2011
Best match: python-ldap 2.3.12
Downloading http://pypi.python.org/pack[…]521b2c2590d9b033894ba5c6f31
Processing python-ldap-2.3.12.tar.gz
Running python-ldap-2.3.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mG2tkc/python-ldap-2.3.12/egg-dist-tmp-XdwZ4B
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
Modules/constants.c: In function ‘LDAPinit_constants’:
Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_CRLFILE’ undeclared (first use in this function)
Modules/constants.c:184: error: (Each undeclared identifier is reported only once
Modules/constants.c:184: error: for each function it appears in.)
error: Setup script exited with error: command 'gcc' failed with exit status 1
1) down load the source package for python-ldap
- wget http://pypi.python.org/[…]/python-ldap-2.3.12.tar.gz
2) tar -zxvf python-ldap-2.3.12.tar.gz
3) cd python-ldap-2.3.12
4) python setup.py install
5) cp -r /usr/lib/python2.4/site-packages/python_ldap-2.3.12-py2.4-linux-i686.egg/ ~/venv/lib/python2.4/site-packages/
I was getting same problem for odict as well, and just follwoed same steps for odict. yes, you havet o touch README.rst , in odict's source dir else it fails to install
hope this helps
***
python: /builddir/build/BUILD/Python-2.7/Objects/typeobject.c:1728: extra_ivars: Assertion `t_size >= b_size' failed.
Aborted
***
Any ideas? Thanks!
I installed the packages listed above, Zope is also starting. However, when I try to add the Plone site to Zope, I get the error below. Can anybody shed some light on this?
Thanks.
Error message in Browser:
---------------------
Site Error
An error was encountered while publishing this resource
ErrorType: AttributeError
Error Value: 'NoneType' object has no attribute 'getName'
------------------------
Terminal output contains:
....
Module Products.ATContentTypes.content.document, line 204, in getTidyOutput
AttributeError 'NoneType' object has no attribute 'getName'
Unhandled exception in thread started by <class ZServer.PubCore.ZServerPublisher.ZServerPublisher at 0xb7760e0c>
Traceback:
File "[...]/parts/zope2/lib/python/ZPublisher/Publish.py", line 401, in publish_module
....
File "[...]/parts/zope2/lib/python/zope/component/registry.py", line 290, in subscribers
return self.adapters.subscribers(objects, provided)
AttributeError: adapters
$ ./bin/instance fg
Traceback (most recent call last):
File "./bin/instance", line 205, in ?
import plone.recipe.zope2instance.ctl
File "/home/livewire/Downloads/cynin313-source-snapshot/eggs/plone.recipe.zope2instance-3.6-py2.4.egg/plone/recipe/zope2instance/ctl.py", line 34, in ?
from Zope2.Startup import zopectl
File "/home/livewire/Downloads/cynin313-source-snapshot/eggs/Zope2-2.13.9-py2.4.egg/Zope2/Startup/zopectl.py", line 328
finally:
^
SyntaxError: invalid syntax
on line 328 zopectl.py uses try...except...finally structure which is valid only from python 2.5, but cynin requires us to use python 2.4? Any help on this one?