简体   繁体   English

在安装带有Openout的OpenERP服务器时出现问题!

[英]Problem installing OpenERP server with buildout !

I'm trying to deploy OpenERP with a buildout and my own piece of code. 我正在尝试通过构建和自己的代码来部署OpenERP。 In fact I would like to build a complete deployement structure allowing me to use OpenERP with custom modules and patch. 实际上,我想构建一个完整的部署结构,使我可以将OpenERP与自定义模块和补丁一起使用。

First of all, before adding any personnal configuration, I was trying to create a buildout which will have the responsability to configure everything. 首先,在添加任何个人配置之前,我试图创建一个扩展,它将负责配置所有内容。

Buildout Configuration 建筑配置

My buildout.cfg configuration file look like this: 我的buildout.cfg配置文件如下所示:

[buildout]
parts = eggs
versions=versions
newest = false
extensions = lovely.buildouthttp
unzip = true
find-links =
       http://download.gna.org/pychart/
[versions]

[eggs]
recipe = zc.recipe.egg
interpreter = python
eggs =
     Paste
     PasteScript
     PasteDeploy
     psycopg2
     PyChart
     pydot
     openerp-server

Configuration problem 配置问题

But when trying to launch the buildout I have a couples of errors when trying to install the last needed egg (openerp-server) 但是,当尝试启动扩展时,尝试安装最后一个需要的鸡蛋(openerp-server)时会遇到一些错误

On my side it just cannot find these modules, but they are in my eggs dir: 在我这边,找不到这些模块,但是它们在我的鸡蛋目录中:

Error: python module psycopg2 (PostgreSQL module) is required
Error: python module libxslt (libxslt python bindings) is required
Error: python module pychart (pychart module) is required
Error: python module pydot (pydot module) is required
error: Setup script exited with 1
An error occured when trying to install openerp-server 5.0.0-3. Look above this message for any errors that were output by easy_install.
Is this possible that openerp hardcoded the his searching path somewhere ?

easy_install, a try easy_install,尝试

I decided to give a try to a clean virtualenv without any relation to the main site-package. 我决定尝试一个干净的virtualenv,而与主站点包没有任何关系。 But when using easy_install on openerp-server: 但是在openerp服务器上使用easy_install时:

$ source openerp-python/bin/activate
$ easy_install openerp-server
...
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 887, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  SandboxViolation: mkdir('/home/mlhamel/.python-eggs/psycopg2-2.0.13-py2.5-linux-x86_64.egg-tmp', 511) {}

I have always the error message however psyopg2 was installed or not on my machine 我总是收到错误消息,但是我的计算机上是否安装了psyopg2

System's Configuration 系统配置

  • Ubuntu 9.10 x86-64 Ubuntu 9.10 x86-64
  • Tried on Python 2.5/Python 2.6 在Python 2.5 / Python 2.6上试用

Ok I did this recently: 好的,我最近做了这个:

Don't try to install the egg, openerp is not really standard. 不要尝试安装鸡蛋,openerp并不是真正的标准。

I used this buildout snippet: 我使用了此构建代码段:

# get the openerp-stuff as a distutils package
[openerp-server]
recipe = zerokspot.recipe.distutils
urls = http://www.openerp.com/download/stable/source/openerp-server-5.0.6.tar.gz

# similar idea for the web component
[openerp-web]
recipe = zc.recipe.egg:scripts
find-links  = http://www.openerp.com/download/stable/source/openerp-web-5.0.6.tar.gz

# add some symlinks so you can run it out of bin
[server-symlinks]
recipe = cns.recipe.symlink
symlink =  ${buildout:parts-directory}/openerp-server/bin/openerp-server = ${buildout:bin-directory}

The key however, is that I did not use virtualenv. 然而,关键的是,我没有使用的virtualenv。 You don't need to with buildout. 您不需要建立。 Buildout + virtualenv is like Trojan + Ramses... one is enough, unless you are ... well one is enough. Buildout + virtualenv就像Trojan + Ramses ...一个就足够了,除非您...一个就足够了。 ;) ;)

Now for this particular project I had followed the debian instructions and installed the required libs via aptitude. 现在,对于这个特定项目,我遵循了debian的说明,并通过aptitude安装了所需的库。 This was only because I was new to buildout at the time, one could just as easily install the psycopg2 module 这只是因为当时我是新手,所以可以像安装psycopg2模块一样轻松

Here are some excellent instructions . 这里有一些很好的说明 Ignore the django stuff if you don't need it. 如果不需要,请忽略django的内容。 Dan Fairs is both a great writer and great buildout tutor. 丹·费尔斯(Dan Fairs)既是一位出色的作家,又是一位出色的家庭教师。 Check it out. 看看这个。 Disclaimer: I am a disciple of the man, based on his buildout usage. 免责声明:根据他的使用习惯,我是他的门徒。

I am certain you do not want to use the egg on pypi, it never worked for me, openerp is not eggified, it's a distutils package. 我确定您不想在pypi上使用鸡蛋,它对我没用,openerp没有鸡蛋化,它是distutils软件包。

Good luck! 祝好运!

仅作记录:Pypi中提供了OpenERP的扩展配方

I'm not familiar with buildout, but if I were going to try building an OpenERP installer, I'd start by looking at the nice one from Open Source Consulting . 我对扩展并不熟悉,但是如果我要尝试构建OpenERP安装程序,那么我首先来看看Open Source Consulting的一个不错的安装程序。 I've used it and been pretty happy with it. 我用过它,对此非常满意。

Last time I checked, it doesn't set up the CRM e-mail gateway, but everything else I need was covered. 上次检查时,它没有设置CRM电子邮件网关,但涵盖了我需要的所有其他内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM