nickyspag
nickyspag

Reputation: 115

Plone 4.0.5 unified installer failing on Ubuntu 11.04 (natty) with zip/zlib error

I am a Plone newbie and am trying to install Plone 4.0.5 on Ubuntu 11.04 Natty using the Unified Installer.

I unpack the installer and run the ./install.sh zeo as root and I get the following error:

ZEO Cluster Install selected

Detailed installation log being written to /tmp/Plone-4.0.5-UnifiedInstaller/install.log

Root install method chosen. Will install for use by system user plone

Installing Plone 4.0.5 at /usr/local/Plone

User 'plone' already exists. No need to create it.
Skipping libjpeg build
Skipping zlib build
Skipping readline build
Installing Python 2.6.6. This takes a while...
Traceback (most recent call last):
  File "", line 1, in 
LookupError: unknown encoding: zip
Python zlib support is missing; something went wrong in the zlib or python build.

Installation has failed.
See the detailed installation log at /tmp/Plone-4.0.5-UnifiedInstaller/install.log
to determine the cause.

I have installed these ubuntu packages too:

apt-get install zlib1g zlib1g-dev zlibc libghc6-zlib-dev zlibc

The install.log is quite big - I'm just including mentions of zlib here:

Starting at Tue May 17 14:12:46 SAST 2011
configure: WARNING: unrecognized options: --with-readline, --with-zlib, --disable-tk, --with-cxx
...
Failed to find the necessary bits to build these modules:
_bsddb             _sqlite3           _tkinter        
bsddb185           dbm                gdbm            
sunaudiodev        zlib                               
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
crypt              nis          
...

I can't find a setup.py in the installation files.

Any ideas what I should do or what I should be looking for?

Thank you.

Upvotes: 5

Views: 5945

Answers (5)

Dan Jacka
Dan Jacka

Reputation: 1782

Instructing the Unified Installer to build its own zlib works: ./install.sh --libz=yes zeo

Upvotes: 2

nickyspag
nickyspag

Reputation: 115

Thank you - Plone installed successfully.

Following this and this led me to this patch for setup.py

For sake of other newbies - here is how to apply the patch:

View the raw text of the patch here and copy from the line immediately following (not including) the diff... line to the end. Copy into a text file. For this example let's say you named this file /tmp/patch.txt

Change to the root directory of the unpacked Unified Installer files and then do the following:

cd packages
tar xjf Python-2.6.6.tar.bz2
rm Python-2.6.6.tar.bz2
cd Python-2.6.6
patch < /tmp/patch.txt

If the patch worked you should see:

patching file setup.py
Hunk #1 succeeded at 354 (offset 15 lines).

Then you need to tar and bzip2 the Python package up again:

cd ..
tar cjf Python-2.6.6.tar.bz2 Python-2.6.6
rm -r Python-2.6.6

Now run the installer again and it should be able to find the modules it needs to build the python2.6 included in the Unified Installer.

Upvotes: 2

SteveM
SteveM

Reputation: 6048

Note that if you have an acceptable Python on your system already (or can install one), you may use "--with-python=/path/to/Python-2.6" on the install.sh command line.

Upvotes: 1

tMC
tMC

Reputation: 19355

Its an issue with the Python disutils and the new multilib setup of natty. I ran into the same issue trying to get sqlite support in Python built from source.

You can hack around it in the detect modules section of the setup.py

http://bugs.python.org/issue9762

Edit:

To work around it, change lib_dirs in the python setup.py (around line 408) to this (for an x86_64 machine):

lib_dirs = self.compiler.library_dirs + [
    '/lib64', '/usr/lib64',
    '/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu',
    ]

(the /usr/lib/x86_64-linux-gnu is missing)

Upvotes: 9

Auspex
Auspex

Reputation: 2254

Works fine for me - but then I built it on a maverick system, then upgraded to natty.

Prereqs that I have that look necessary for you:

zlib1g-dev (which you have)
python-gdbm
libgdbm3
libsqlite3-0 (hard to imagine you would not have that)
python-tk

bsddb & sunaudio are both part of the system python2.6 - you could try building with that (aptitude install python2.6, if necessary)

Upvotes: 0

Related Questions