分享

关于Plone4.1.3及4.0.7不能在Ubuntu 11.10下安装

 信因果_得永生 2012-05-04


hi,我按照你的方法修改setup.py后,出现了新的问题。
Installing Plone 4.1.3 at /usr/local/Plone

Adding user account 'plone' to system ...
Compiling and installing jpeg local libraries ...
Skipping zlib build
Compiling and installing readline local libraries ...
Installing Python 2.6.7. This takes a while...
Patching for thread size
Failed to patch for thread size.

Installation has failed.
See the detailed installation log at /home/ubuntu/Plone-4.1.3-UnifiedInstaller/install.log
to determine the cause.

不知道您是否碰到过?如何解决?
问题如下:
64位Ubuntu 11.10,安装了所有的升级和补丁,显卡驱动也更新了,从Plone.org下载的Universal installation pack 4.1.3在解压缩之后,运行如下命令:
./install.sh standalone --password=123
先是那个python编译不能通过,说是什么zip code的问题LookupError: Unknown Encoding: zip
然后又是zlib的问题,用了--libz=no参数依然不行
然后又是libxml的问题,用了apt-get install libxml依然不行;
然后又是buildout运行不正常导致退出的问题。到这里死活过不去,让人感觉这一版本的Plone简直是漏洞百出,问题太多了。

其实根本问题就是Plone自带的Python编译没有通过的问题。解决了这个问题后面的都不是问题了。
在google.com搜索LookupError: UnknowEncoding: zip这个错误信息,在http://网站上有一条解答,现摘录如下:

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

在Plone/package下找到python-2.6.7-tar.bz2,将他解压缩,找到里面的setup.py文件,浏览到408行附近,然后按照上面所说的,加上'/usr/lib/x86_64-linux-gnu',这些红色的内容。别忘了逗号。然后保存这个setup.py文件。

下面还需要将解压缩出来的文件重新压缩成python-2.6.7-tar.bz2,再次运行install.sh standalone,Plone的安装就能成功了。

特别注意!原帖有一个回复如下:
Thanks for that answer, I've been struggling for weeks now! Note for lazy people in 32 bit systems, the directory is: /usr/lib/i386-linux-gnu instead of the x86_64.

PS:
1、上面所说的natty,指的是Ubuntu 11.04。
2、如果使用11.10的Ubuntu server的话,要先装上gcc、make和libssl-dev这三个软件包,才能正常装上Plone4.1.3

最后,附上成功安装的Console输出。
===============================================================
Stand-Alone Zope Instance selected

Detailed installation log being written to /home/liuyz/Plone-4.1.3-UnifiedInstaller/install.log

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

Installing Plone 4.1.3 at /usr/local/Plone

User 'plone' already exists. No need to create it.
Compiling and installing jpeg local libraries ...
Skipping zlib build
Compiling and installing readline local libraries ...
Installing Python 2.6.7. This takes a while...
Patching for Debian/Ubuntu Multiarch
Patching for thread size
Patching for disabled ssl2
Installing distribute...
Python build looks OK.
Unpacking buildout cache to /usr/local/Plone/buildout-cache
Compiling .py files in egg cache
Copying Plone-docs
Your platform's xml2/xslt are missing or out-of-date. We'll need to build them.
Copying buildout skeleton
Fixing up bin/buildout
Building lxml with static libxml2/libxslt; this takes a while...
Building Zope/Plone; this takes a while...
Setting instance ownership to plone
Setting buildout cache ownership to plone
 
#####################################################################
######################  Installation Complete  ######################
 
Plone successfully installed at /usr/local/Plone
See /usr/local/Plone/zinstance/README.html
for startup instructions
 
Use the account information below to log into the Zope Management Interface
The account has full 'Manager' privileges.
 
  Username: admin
  Password: 123

This account is created when the object database is initialized. If you change
the password later (which you should!), you'll need to use the new password.
 
- If you need help, ask the mailing lists or #plone on irc.freenode.net.
- The live support channel also exists at http:///chat
- You can read/post to the lists via http:///forums
 
- Submit feedback and report errors at http://dev./plone
(For install problems, specify component "Installer (Unified)")

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多