Hi all,
So, the latest Ubuntu 10.04 (Lucid Lynx) no longer has python2.4
packages. Luckily we have the python buildout, advertised more for the
Mac but working on Linux quite well too:
http://svn.plone.org/svn/collective/buildout/python
PIL even gets installed. Plone 3 starts up fine when you create a
buildout with the python2.4 executable created in this way. But
uploading a jpeg file will work but fail to create a thumbnail, preview,
etcetera. This is because the _imaging module cannot be imported
because libjpeg cannot be found:
$ python2.4 -c "import _imaging"
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: libjpeg.so.7: cannot open shared object file: No such file
or directory
Now, the libjpeg library *is* available in the python buildout. If I
tell python where to find this library, it works:
$ LD_LIBRARY_PATH=/home/maurits/buildout/python/python-2.4/lib python2.4
-c "import _imaging"
That command exits without error.
Does anyone know how to change the python buildout so this works without
needing to specify this LD_LIBRARY_PATH when running python?
I could probably add this to the environment-vars in the instance part
of the Plone buildout, but hardcoding '/home/maurits' in there seems
like a bad idea. At least when trying, this works, though it clobbers
any previously setting for LD_LIBRARY_PATH:
environment-vars =
LD_LIBRARY_PATH /home/maurits/buildout/python/python-2.4/lib
Hm, I have not checked yet if the Universal Installers still work on
Ubuntu 10.04 and if they have solved it in a fine way already. Does
anyone know?
BTW, as Jarno de Wit pointed out to me, the following also works:
sudo ln -s /home/maurits/buildout/python/parts/opt/lib/libjpeg.so.7
/usr/lib/libjpeg.so.7
But this makes it available for all programs of the system, and I have
heard from a colleague that after similar changes he was not able to
login in Ubuntu anymore; so this may be a bit dangerous, as it does not
restrict the changes to just Plone or even python, but makes them for
the whole operating system.
Alternatively, I hear that using python packages from the previous
Ubuntu works too.
Cheers,
--
Maurits van Rees
Programmer, Zest Software
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers