Plone 4.0.5统一安装程序在Ubuntu 11.04(natty)上失败,出现zip / zlib错误

时间:2011-05-17 12:39:19

标签: python ubuntu plone zlib

我是Plone新手,我正在尝试使用统一安装程序在Ubuntu 11.04 Natty上安装Plone 4.0.5。

我解压缩安装程序并以root身份运行./install.sh zeo,我收到以下错误:

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.

我也安装了这些ubuntu软件包:

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

install.log很大 - 我只是在这里提到了zlib:

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          
...

我在安装文件中找不到setup.py。

任何想法我应该做什么或我应该寻找什么?

谢谢。

5 个答案:

答案 0 :(得分:9)

它是Python disutils和natty的新multilib设置的问题。我遇到了同样的问题,试图从源代码构建Python中的sqlite支持。

你可以在setup.py

的detect modules部分解决它

http://bugs.python.org/issue9762

修改

要解决此问题,请将python setup.py(第408行)中的lib_dirs更改为此(对于x86_64计算机):

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

(缺少/ usr / lib / x86_64-linux-gnu)

答案 1 :(得分:2)

谢谢 - Plone安装成功。

关注thisthis让我进入this patch for setup.py

为了其他新手 - 以下是如何应用补丁:

查看raw text of the patch here 并从紧随diff...行之后(不包括)行的行复制到结尾。复制到文本文件中。对于此示例,假设您将此文件命名为/tmp/patch.txt

切换到解压缩的Unified Installer文件的根目录,然后执行以下操作:

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

如果补丁有效,你应该看到:

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

然后你需要再次tar和bzip2 Python包:

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

现在再次运行安装程序,它应该能够找到构建统一安装程序中包含的python2.6所需的模块。

答案 2 :(得分:2)

指示Unified Installer构建自己的zlib:./install.sh --libz=yes zeo

答案 3 :(得分:1)

请注意,如果您的系统上已有可接受的Python(或者可以安装一个),则可以在install.sh命令行中使用“--with-python = / path / to / Python-2.6”。 / p>

答案 4 :(得分:0)

对我来说很好 - 但后来我在一个特立独行的系统上构建它,然后升级为natty。

Prereqs我觉得你看起来很有必要:

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

bsddb&amp; sunaudio都是系统python2.6的一部分 - 你可以尝试用它构建(aptitude install python2.6,如果需要的话)