Mac上的Odoo安装无法执行命令LESSC
所以我有一台运行10.11.4(El Capitan)的Mac。
我遵循了本教程:http :
//kiattipong.blogspot.com/2015/05/setup-odoo-development-on-os-x-
with.html?showComment=1459570104589。实际上,我在此博客的评论部分中发布的问题也是如此。
一切顺利进行到我遇到一些安装错误(找不到文件)的需求部分。当我尝试运行python ./odoo.py时,我会丢失模块错误。因此,我使用pip
install(psycopg2,reportlab,dateultil,passlib,psutil,requests)手动安装了一些工具,最后使odoo服务器运行了。但是当我尝试localhost:8069时,我不断收到内部服务器错误。
我在下面遇到这个问题,我认为postgresql
db的配置错误导致了我的odoo在没有html和css格式的情况下加载的问题。然后一下子起作用了,我创建了一个dbname和密码,但是现在我得到了这个屏幕:
这是LESSC错误的最新堆栈跟踪:
(odoo-env) Marcios-MacBook-Air:~ quique123$ cd odoo
(odoo-env) Marcios-MacBook-Air:odoo quique123$ python ./odoo.py
2016-04-02 16:28:03,335 544 INFO ? openerp: OpenERP version 9.0c
2016-04-02 16:28:03,335 544 INFO ? openerp: addons paths: ['/Users/quique123/Library/Application Support/Odoo/addons/9.0', u'/Users/quique123/odoo/openerp/addons', u'/Users/quique123/odoo/addons']
2016-04-02 16:28:03,336 544 INFO ? openerp: database: default@default:default
2016-04-02 16:28:03,630 544 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
2016-04-02 16:30:06,356 544 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
2016-04-02 16:30:07,381 544 INFO ? openerp.addons.report.models.report: You need Wkhtmltopdf to print a pdf version of the reports.
2016-04-02 16:30:07,787 544 INFO ? openerp.http: HTTP Configuring static files
2016-04-02 16:30:07,938 544 INFO santiapps openerp.modules.loading: loading 1 modules...
2016-04-02 16:30:07,955 544 INFO santiapps openerp.modules.loading: 1 modules loaded in 0.02s, 0 queries
2016-04-02 16:30:08,025 544 INFO santiapps openerp.modules.loading: loading 28 modules...
2016-04-02 16:30:08,122 544 INFO santiapps openerp.modules.loading: 28 modules loaded in 0.10s, 0 queries
2016-04-02 16:30:08,578 544 INFO santiapps openerp.modules.loading: Modules loaded.
2016-04-02 16:30:08,580 544 INFO santiapps openerp.addons.base.ir.ir_http: Generating routing map
2016-04-02 16:30:09,466 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:09,827 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:10,000 544 INFO santiapps werkzeug: 127.0.0.1 - - [02/Apr/2016 16:30:09] "GET /web HTTP/1.1" 200 -
2016-04-02 16:30:12,110 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,155 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,185 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,226 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,239 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,419 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,630 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,647 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,651 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,711 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,729 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:12,742 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,829 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,836 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,837 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,921 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,923 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
2016-04-02 16:30:15,951 544 ERROR santiapps openerp.addons.base.ir.ir_qweb: Could not execute command 'lessc'
除非您认为可能是数据库错误,否则无需阅读以下内容
首先,我记得尝试使用此命令创建用户:
sudo su - postgres -c "createuser -s $USER"
我翻译成:
sudo su - postgres -c "createuser -s $quique123"
但仍然是内部服务器错误。我这样做是因为我发现那是由于数据库配置不正确引起的。当我继续研究odoo安装数据库配置问题时,发现需要修改conf文件以输入正确的用户凭据。因此,我进入了我的odoo
/ debian /(在我的virtualenv中)并修改了opernerp-server.conf:
admin_passwd = admin
db_host = localhost
db_port = 8069
db_user = $quique123
db_password = False
它令人困惑,因为在我的CD中,我有:
/ odoo / odoo-env
在/ odoo内部,我有:
/ debian / openerp / openerp-server和其他文件夹
然后在/ debian里面是我修改过的openerp-server.conf。
现在,当我打开localhost:8069时,我确实获得了创建数据库,重击或备份的页面,但是没有html /
css格式,只有白色背景和黑色未格式化的字母,左上角的图像图标坏了,所有的文本字段和下拉列表都没有。但是,如果我查看终端,则会得到以下信息:
**(odoo-env) Marcios-MacBook-Air:odoo quique123$ python ./odoo.py
2016-04-02 12:22:17,541 574 INFO ? openerp: OpenERP version 9.0c
2016-04-02 12:22:17,541 574 INFO ? openerp: addons paths: ['/Users/quique123/Library/Application Support/Odoo/addons/9.0', u'/Users/quique123/odoo/openerp/addons', u'/Users/quique123/odoo/addons']
2016-04-02 12:22:17,542 574 INFO ? openerp: database: default@default:default
2016-04-02 12:22:17,804 574 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069**
2016-04-02 12:23:22,910 574 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
2016-04-02 12:23:22,997 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:22] "GET / HTTP/1.1" 500 -
2016-04-02 12:23:23,007 574 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/Users/quique123/odoo-env/lib/python2.7/site-packages/werkzeug/serving.py", line 177, in run_wsgi
execute(self.server.app)
File "/Users/quique123/odoo-env/lib/python2.7/site-packages/werkzeug/serving.py", line 165, in execute
application_iter = app(environ, start_response)
File "/Users/quique123/odoo/openerp/service/server.py", line 245, in app
return self.app(e, s)
File "/Users/quique123/odoo/openerp/service/wsgi_server.py", line 184, in application
return application_unproxied(environ, start_response)
File "/Users/quique123/odoo/openerp/service/wsgi_server.py", line 170, in application_unproxied
result = handler(environ, start_response)
File "/Users/quique123/odoo/openerp/http.py", line 1487, in __call__
self.load_addons()
File "/Users/quique123/odoo/openerp/http.py", line 1508, in load_addons
m = __import__('openerp.addons.' + module)
File "/Users/quique123/odoo/openerp/modules/module.py", line 61, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/Users/quique123/odoo/addons/document/__init__.py", line 4, in <module>
import models
File "/Users/quique123/odoo/addons/document/models/__init__.py", line 4, in <module>
import ir_attachment
File "/Users/quique123/odoo/addons/document/models/ir_attachment.py", line 8, in <module>
import pyPdf
ImportError: No module named pyPdf
2016-04-02 12:23:23,212 574 INFO ? openerp.http: Generating nondb routing
2016-04-02 12:23:23,228 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:23] "GET /favicon.ico HTTP/1.1" 404 -
2016-04-02 12:23:26,490 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET / HTTP/1.1" 200 -
2016-04-02 12:23:26,538 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web HTTP/1.1" 303 -
2016-04-02 12:23:26,586 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/database/selector HTTP/1.1" 200 -
2016-04-02 12:23:26,641 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 404 -
2016-04-02 12:23:26,643 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 404 -
2016-04-02 12:23:26,646 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 404 -
2016-04-02 12:23:26,648 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 404 -
2016-04-02 12:23:26,649 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 404 -
2016-04-02 12:23:26,651 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 404 -
2016-04-02 12:23:26,663 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/src/img/logo2.png HTTP/1.1" 404 -
2016-04-02 12:23:26,966 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:23:26] "GET /web/static/src/img/favicon.ico HTTP/1.1" 404 -
2016-04-02 12:24:18,834 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/database/selector HTTP/1.1" 200 -
2016-04-02 12:24:18,889 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 404 -
2016-04-02 12:24:18,891 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 404 -
2016-04-02 12:24:18,894 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 404 -
2016-04-02 12:24:18,894 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 404 -
2016-04-02 12:24:18,899 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 404 -
2016-04-02 12:24:18,899 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 404 -
2016-04-02 12:24:18,911 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:24:18] "GET /web/static/src/img/logo2.png HTTP/1.1" 404 -
2016-04-02 12:39:31,759 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/database/selector HTTP/1.1" 200 -
2016-04-02 12:39:31,815 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 404 -
2016-04-02 12:39:31,818 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 404 -
2016-04-02 12:39:31,821 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 404 -
2016-04-02 12:39:31,826 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 404 -
2016-04-02 12:39:31,826 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 404 -
2016-04-02 12:39:31,829 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 404 -
2016-04-02 12:39:31,838 574 INFO ? werkzeug: 127.0.0.1 - - [02/Apr/2016 12:39:31] "GET /web/static/src/img/logo2.png HTTP/1.1" 404 -
-
我似乎是节点/ npm问题。我已经安装了带来npm的node.js软件包。我在Google上搜索后发现,如果没有先删除旧版本就安装了npm,会出现问题吗?
我在某个地方找到了此命令:
sudo rm -rf /usr/local/lib/node_modules/npm
我删除了npm然后重新安装,但是这次我从brew安装节点:
brew install node
然后,我可以按照以下有关lessc错误的部分进行操作,而Odoo似乎运行良好:
http://jingigirl.blogspot.com/2015/10/install-odoo-90-on-
mac.html在这篇文章中,它指出必须先安装更少的插件,然后再安装less-plugin-clean-
css并最终升级节点,在我的情况下,这是不必要的,因为我已经拥有5.10.0节点。导致我问这个问题的原因是,即使从nodejs.org安装了node.js,当我输入node -v时,我仍然收到未安装的错误节点!