Openerp 5.0.1-0 在centos 5.3上安装实录
- 
cd /opt/openerp-server-5.0.1-0/binpython openerp-server.pyERROR: pythonic binding for the libxml2 and libxslt libraries is missing 
 ERROR: Try to install python-lxml package
 需要安装 python-lxml从 pypi.python.org/pypi/lxml/2.2.1 下载lxml-2.2.1.tar.gz cd /opttar zxvf lxml-2.2.1.tar.gzcd lxml-2.2.1python setup.py buildpython setup.py installcd /opt/openerp-server-5.0.1-0/binpython openerp-server.pyImportError: No module named mx.DateTime 
 需要安装mx.DateTime从 www.egenix.com/products/python/mxBase/ 
 下载 egenix-mx-base-3.1.2.linux-i686-py2.4_ucs4.prebuilt.zipcd /optunzip egenix-mx-base-3.1.2.linux-i686-py2.4_ucs4.prebuilt.zipcd egenix-mx-base-3.1.2.linux-i686-py2.4_ucs4.prebuiltpython setup.py buildpython setup.py installcd /opt/openerp-server-5.0.1-0/binpython openerp-server.pyImportError: No module named reportlab.platypus 
 需要安装reportlab从 www.reportlab.org/ftp/ 下载 ReportLab_2_3.tar.gz cd /opttar zxvf ReportLab_2_3.tar.gzcd ReportLab_2_3python setup.py buildpython setup.py installcd /opt/openerp-server-5.0.1-0/binpython openerp-server.pyImportError: No module named pychart 
 需要安装pychart从 download.gna.org/pychart/ 下载 PyChart-1.39.tar.gz cd /opttar zxvf PyChart-1.39.tar.gzcd PyChart-1.39python setup.py buildpython setup.py installcd /opt/openerp-server-5.0.1-0/binpython openerp-server.py测试通过 可以开始安装server了 cd /opt/openerp-server-5.0.1-0python setup.py buildError: python module pydot (pydot module) is required 
 还需要安装pydot从 code.google.com/p/pydot/ 下载 pydot-1.0.2.tar.gz cd /opttar zxvf pydot-1.0.2.tar.gzpython setup.py buildpython setup.py installcd /opt/openerp-server-5.0.1-0python setup.py buildpython setup.py install安装成功 openerp-server 可直接运行服务端会有警告 
 WARNING; Python Imaging not installed, you can use only .JPG pictures !
 安装python-imagingyum install python-imaging安装easy_install,便于安装其他需要的模块 yum install python-setuptoolseasy_install -U setuptoolseasy_install pytzeasy_install vobject
- 
ERROR: pythonic binding for the libxml2 and libxslt libraries is missing 
 ERROR: Try to install python-lxml package
 需要安装 python-lxml
 我用easy_install-2.5安装了lxml包,而且也提示完成,并且easy_install在easy_install.pth里添加了相应路径,在site-packages下面我也看到对应的包了。可一运行还是提示要我装那个包。
 我安装的libxml2,libxslt是在特定的目录中,当用python2.5 setup.py build的时候,提示是使用我安装目录下的libxml2,libxslt的lib。是不是跟我装的libxml2,libxslt有关系或冲突啊?
- 
liu198619, 刚刚用你的用户名google了一下。呵呵,兄弟真是执着呀。Hostmonster的客服是如此之烂,兄弟你却不离不弃。 
 来分析一下你的问题:
 1、lxml本身就是libxml2,libxslt的python binding, 必须的是libxml2和libxslt库,[b]不必须[/b]的是python-libxml2, python-libxslt
 2、如果你已经安装lxml成功,应该可以:
 [code]import lxml
 lxml.path[/code]
 看看lxml包的路径为何
 3、lxml包如果不在当前python的site-package路径中,你也可以在PYTHONPATH中为其指定
 export PYTHONPATH=path_to_lxml如果仍然不行,请提供更多的信息 
- 
谢谢版主啊!我刚才试了. 
 执行完 [b]import lxml[/b]
 [b]lxml.path[/b]
 得到的路径信息是:[b]['/home2/lyrhdcom/python/lib/python2.5/site-packages/lxml-2.2.1-py2.5-linux-x86_64.egg/lxml'][/b]
 我的python2.5的安装路径是:[b]/home2/lyrhdcom/python[/b]
 其它的包,像reportlab类的都是安装在[b]/home2/lyrhdcom/python/lib/python2.5/site-packages[/b]下。
 我看了shine-it上Wiki里在Redhat系统从源码安装Tiny ERP的文章,对下面这一段话非常不理解
 [b]安装libxslt,一定要先安装libxsltl再安装python-libxml2,python-libxslt包含在python-libxml2中。[/b]
 [b]安装python-libxml2 CPPFLAGS="-I$/usr/local/lib/python2.5/site-packages/mx/DateTime/mxDateTime" ./configure --with-postgres-libraries=/usr/local/pgsql/lib --with-postgres-includes=/usr/local/pgsql/include make;make install [/b]
 到底应该怎么操作啊?我主机上自带的libxml2的版本是2.6.16-12.6,libxslt是1.1.11-1.e14_7.2
 但是安装lxml至少需要libxml2 2.7.2,ibxslt 1.1.15。我自己安装了libxml2,libxslt,路径是[b]home2/lyrhdcom/libxml2.7,[/b][b]home2/lyrhdcom/libxslt1
 [/b]也把它们增加到shell的路径里了。
- 
我安装lxml时的成功信息: 
 Running lxml-2.2.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l0q2rB/lxml-2.2.2/egg-dist-tmp-LXkfr9
 Building lxml version 2.2.2.
 Building with Cython 0.11.2.
 Using build configuration of libxslt 1.1.24
 Building against libxml2/libxslt in one of the following directories:
 /home2/lyrhdcom/libxslt1/lib
 /home2/lyrhdcom/libxml2.7/lib
 Adding lxml 2.2.2 to easy-install.pth fileInstalled /home2/lyrhdcom/python/lib/python2.5/site-packages/lxml-2.2.2-py2.5-linux-x86_64.egg 
 Processing dependencies for lxml
 Finished processing dependencies for lxml在lxml安装的目录下面有这些文件,是不是缺少文件啊? 
 ElementInclude.py*
 ElementInclude.pyc
 init.py*
 init.pyc
 _elementpath.py*
 _elementpath.pyc
 builder.py*
 builder.pyc
 cssselect.py*
 cssselect.pyc
 doctestcompare.py*
 doctestcompare.pyc
 etree.py*
 etree.pyc
 etree.so*
 objectify.py*
 objectify.pyc
 objectify.so*
 pyclasslookup.py*
 pyclasslookup.pyc
 sax.py*
 sax.pyc
 usedoctest.py*
 usedoctest.pychtml子目录下面是 
 ElementSoup.py*
 ElementSoup.pyc
 init.py*
 init.pyc
 _dictmixin.py*
 _dictmixin.pyc
 _diffcommand.py*
 _diffcommand.pyc
 _html5builder.py*
 _html5builder.pyc
 _setmixin.py*
 _setmixin.pyc
 builder.py*
 builder.pyc
 clean.py*
 clean.pyc
 defs.py*
 defs.pyc
 diff.py*
 diff.pyc
 formfill.py*
 formfill.pyc
 html5parser.py*
 html5parser.pyc
 soupparser.py*
 soupparser.pyc
 usedoctest.py*
 usedoctest.pyc[img]file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg[/img][img]file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg[/img] 
- 
哈哈,错误终于找到了,是没有设置变量的问题,因为我的libxml2,libxslt是安装在特定目录,必须指定LD_LIBRARY_PATH这个变量值,让lxml能够找到相应的库。 
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home2/lyrhdcom/libxml2.7/lib:/home2/lyrhdcom/libxslt1/lib
 现在这个问题解决了,可新有问题又出现了,说是 ImportError: /home2/lyrhdcom/python/lib/python2.5/site-packages/mx/DateTime/mxDateTime/mxDateTime.so: cannot open shared object file: No such file or directory
 可 /home2/lyrhdcom/python/lib/python2.5/site-packages/mx/DateTime/mxDateTime/mxDateTime.so这个文件明明存在啊。
 呵呵,看来安装成功的道路还是很遥远啊!
- 
liu198619兄干得很出色,也让我学到了新东西。 在 Linux 下面,共享库的寻找和加载是由 /lib/ld.so 实现的。 ld.so 在标准路经(/lib, /usr/lib) 中寻找应用程序用到的共享库。但是,如果需要用到的共享库在非标准路经,ld.so 怎么找到它呢? 
 目前,Linux 通用的做法是将非标准路经加入 /etc/ld.so.conf,然后运行 ldconfig 生成 /etc/ld.so.cache。 ld.so 加载共享库的时候,会从 ld.so.cache 查找。
 传 统上, Linux 还有一个环境变量 - LD_LIBRARY_PATH 来处理非标准路经的共享库。虽然这个环境变量并不值得推荐,但是在权限受制的情况下,不失为一个解决问题的办法。 
