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

发布于 2024-11-07 14:08:45 字数 1612 浏览 0 评论 0原文

我是 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。

有什么想法我应该做什么或我应该寻找什么吗?

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

豆芽 2024-11-14 14:08:45

这是 Python disutils 和 natty 新的 multilib 设置的问题。我在尝试从源代码构建的 Python 中获得 sqlite 支持时遇到了同样的问题。

您可以在 setup.py

http://bugs.python.org/issue9762< 的检测模块部分破解它/a>

编辑:

要解决此问题,请将 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 丢失)

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)

若相惜即相离 2024-11-14 14:08:45

谢谢 - Plone 安装成功。

遵循引导我这个setup.py补丁

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

查看补丁的 原始文本这里
并从紧接着(不包括)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 所需的模块。

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.

悲欢浪云 2024-11-14 14:08:45

指示统一安装程序构建自己的 zlib 有效:./install.sh --libz=yes zeo

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

梦冥 2024-11-14 14:08:45

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

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.

很酷不放纵 2024-11-14 14:08:45

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

我有你需要的先决条件:

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

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

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文