安装odoo过程中出现的问题
一 centos6.5
1. simplejson
error:module not found
fix:
easy_install simplejson
2. python version
error:
"""
Traceback (most recent call last):
File "./odoo.py", line 160, in <module>
main()
File "./odoo.py", line 156, in main
import openerp
File "/home/gdy/odoo-dev/odoo/openerp/__init__.py", line 76, in <module>
import modules
File "/home/gdy/odoo-dev/odoo/openerp/modules/__init__.py", line 27, in <module>
from . import db, graph, loading, migration, module, registry
File "/home/gdy/odoo-dev/odoo/openerp/modules/graph.py", line 32, in <module>
import openerp.osv as osv
File "/home/gdy/odoo-dev/odoo/openerp/osv/__init__.py", line 22, in <module>
import osv
File "/home/gdy/odoo-dev/odoo/openerp/osv/osv.py", line 23, in <module>
from .orm import Model, TransientModel, AbstractModel
File "/home/gdy/odoo-dev/odoo/openerp/osv/orm.py", line 5, in <module>
from ..models import (
File "/home/gdy/odoo-dev/odoo/openerp/models.py", line 2091
groupby_dict = {gb['groupby']: gb for gb in annotated_groupbys}
^
SyntaxError: invalid syntax
"""
fix: change python version from 2.6 to 2.7
first removed old mod_wsgi files:
rm -rf /usr/lib/apache2/modules/mod_wsgi*
Then downloaded and installed mod_wsgi this way:
wget https://github.com/GrahamDumpleton/mod_wsgi/archive/master.zip unzip master cd mod_wsgi-master sudo ./configure --with-python=/path/to/bin/python2.7 sudo LD_RUN_PATH=/usr/local/lib make sudo make install
# make 在这一步如果出现make: *** [mod_wsgi.la]错误则需要重新编译安装python2.7并加上--enable-shared参数
如果还是出现 /bin/sh: apxs: command not found, install apxs:
yum install httpd-devel
then
sudo ./configure --with-python=/path/to/bin/python2.7 --with-apxs=/usr/sbin/apxs sudo LD_RUN_PATH=/usr/local/lib make sudo make install
二 Ubuntu 14.04