2009年3月31日星期二

ubuntu之python-ldap安装

这个东西够折腾人的,终于把它装上了!
你如是没有在 ubuntu 上把 python-ldap 2.3.6 装上,可以下载源码包:
http://downloads.sourceforge.net/python-ldap/python-ldap-2.3.6.tar.gz?use_mirror=jaist
然后解压缩,查看 setup.cfg 文件,其中的:
libs = ldap_r lber sasl2 ssl crypto
就是安装的重点啦!
记得把跟这些库及其开发包都装上:
$ sudo apt-get install libldap-2.4-2 ldap-utils libldap2-dev libsasl2-modules-ldap libsasl2-modules-ldap db4.6-util libssl-dev libsasl2-dev openssl
等。。。
然后:
$ python setup.py build
没有出现 error 就可以正常安装了。

俺一个包一个包的尝试,在几个小时之后终于把它装上了哇,受虐有时候就是这样的。

还是 Fedora 和 Arch 好,不需要这样折腾。

2009年3月26日星期四

精简后的xorg.conf文件

其实在 Fedora 和 Arch 上 xorg 的配置文件差不多一致,其他发行版也应该类似。现在我的精简 xorg.conf 文件:

=======================================================================

# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules/extensions/fglrx"
ModulePath "/usr/lib/xorg/modules"
EndSection

Section "Module"
EndSection

Section "ServerFlags"
Option "AIGLX" "on"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
BusID "PCI:1:0:0"
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection



================================================================================
如果你有一天发现运行不了 ATI Catalyst Control Center 和 Compiz 等桌面特效的话,
请检查你的 xorg.conf 文件中 Section "Files" 中的内容是否被清空了。清空了的话请加上类似上面的两行 ModulePath 就可以了。出现这个问题我估计是升级 catalyst 驱动的时候弄丢的。

2009年3月11日星期三

yum 的依赖处理还是很弱

今天在使用 repoze.who.ldap 的时候,需要安装 python-ldap 包,在已经用 yum 安装上了 openldap 和 python-ldap 包的情况下,使用 repoze.who.ldap 还是出错。出错的信息看上去与 gcc 相关,于是猜测缺少一些头文件之类的开发包文件,就把 openldap-devel 等安装上,然后就可以了。所以估计在不安装 openldap-devel 的情况下, python-ldap 也无法正常使用。

另外,包列表的数据库非常巨大,特别是添加了 rpmfusion 源之后就更加恐怖了。这时候在使用了 fastestmirror presto 之后,系统更新安装包是比较快速了,不过对于 yum 使用 bash_complete 功能补全包名字,比如 $ yum install gstream 然后按 tab 按健将使得 yum 几乎假死。

2009年3月4日星期三

zope2 现在可以通过easy_install安装了

http://regebro.wordpress.com/2009/02/27/zope-2-now-in-egg-form/

Zope 2.12 alpha 1 has been released. It’s completely “eggified”, meaning that all parts of it are separate python modules, installable with setuptools easy_install command. The main egg is called just Zope2, and you can therefore now install Zope 2 with “easy_install Zope2″ from the command line. Of course, this will install it in the system library, which is probably not what you want. So you probably want to use virtualenv to create a separate installation, or use buildout.

Here are the commands I used to test this alpha version:

virtualenv zope212 # Create a python sandbox for testing

cd zope212

bin/easy_install Zope2 # Install Zope 2

# make coffee while Zope 2 gets downloaded and installed

bin/mkzopeinstance

cd testinstance # Or whatever you called it

bin/zopectl fg

Yeah, that’s it! Works like a charm. Even on Python 2.6! Zope 2.12 will be released probably around a similar time as Plone 4. Plone 3.2 is already completely eggyfied, but Plone buildouts still need to have special recipies for installing Zope 2. With Zope 2.12 this will no longer be necessary, and you can install Plone just by doing an easy_install Plone, and get all of the parts installed. Which is totally cool!

So thanks to everyone involved in this, and also to everyone involved in eggifying Zope3, without which this never could have happend!

Posted in python, zope Tagged: eggs, plone

==============================
这是一个好消息!
赶快试下。。。
希望能工作在 python2.5 和 python2.6 上。哈哈
不要像不久前发布的 zope 3.4.0 那样,一上来就只认 python 2.4
PyPi 上的说明:
http://pypi.python.org/pypi/Zope2/