安装kilo版本openstack-dashboard时出现的python compress command not found错误解决办法
2017-01-22 13:33
851 查看
安装openstack-dashboard时出现的python compress command not found错误解决办法
httpd服务启动失败
执行上面状态中失败的命令会出现具体的错误信息
错误分析:
python-django无法执行compress的命令,按照网上的说法修改文件中的compress
将type='text/scss' 修改为type='text/x-scss' 或者type='text/css' ,重启httpd服务,服务依旧启动失败或者能够启动成功,但是查看状态依旧显示异常。
正确的解决办法:
修改django-pyscss的版本,2.0.2版本的才可以正常使用
默认安装的时候,会自动安装epel中的源,版本为1.0.5
把1.0.5版本去掉,使用pip安装2.0.2版本
重启httpd服务
httpd服务启动失败
# systemctl status httpd ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/httpd.service.d └─openstack-dashboard.conf Active: failed (Result: exit-code) since Fri 2016-10-14 16:13:27 CST; 25s ago Docs: man:httpd(8) man:apachectl(8) Process: 86591 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=1/FAILURE) Process: 86581 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS) Main PID: 82651 (code=exited, status=0/SUCCESS) Oct 14 16:13:27 bdc2 python[86591]: CommandError: An error occurred during rendering /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html: /bin/sh: django_pyscss.compressor.DjangoScssFilter: command not found Oct 14 16:13:27 bdc2 python[86591]: Found 'compress' tags in: Oct 14 16:13:27 bdc2 python[86591]: /usr/lib/python2.7/site-packages/horizon/templates/horizon/_conf.html Oct 14 16:13:27 bdc2 python[86591]: /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html Oct 14 16:13:27 bdc2 python[86591]: /usr/lib/python2.7/site-packages/horizon/templates/horizon/_scripts.html Oct 14 16:13:27 bdc2 python[86591]: Compressing... Oct 14 16:13:27 bdc2 systemd[1]: httpd.service: control process exited, code=exited status=1 Oct 14 16:13:27 bdc2 systemd[1]: Failed to start The Apache HTTP Server. Oct 14 16:13:27 bdc2 systemd[1]: Unit httpd.service entered failed state. Oct 14 16:13:27 bdc2 systemd[1]: httpd.service failed.
执行上面状态中失败的命令会出现具体的错误信息
# /usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force Found 'compress' tags in: /usr/lib/python2.7/site-packages/horizon/templates/horizon/_conf.html /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html /usr/lib/python2.7/site-packages/horizon/templates/horizon/_scripts.html Compressing... CommandError: An error occurred during rendering /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html: /bin/sh: django_pyscss.compressor.DjangoScssFilter: command not found
错误分析:
python-django无法执行compress的命令,按照网上的说法修改文件中的compress
{% load compress %} {% compress css %} <link href='{{ STATIC_URL }}dashboard/scss/horizon.scss' type='text/scss' media='screen' rel='stylesheet' /> {% endcompress %}
将type='text/scss' 修改为type='text/x-scss' 或者type='text/css' ,重启httpd服务,服务依旧启动失败或者能够启动成功,但是查看状态依旧显示异常。
正确的解决办法:
修改django-pyscss的版本,2.0.2版本的才可以正常使用
默认安装的时候,会自动安装epel中的源,版本为1.0.5
# yum list|grep django-pyscss python-django-pyscss.noarch 1.0.5-2.el7 @epel # cd /usr/lib/python2.7/site-packages/ # ls |grep pyscss django_pyscss django_pyscss-1.0.5-py2.7.egg-info
把1.0.5版本去掉,使用pip安装2.0.2版本
# cd /usr/lib/python2.7/site-packages/ # mv django_pyscss-1.0.5-py2.7.egg-info django_pyscss-1.0.5-py2.7.egg-info_bak # pip install django-pyscss==2.0.2 # pip list|grep pyscss django-pyscss (2.0.2)
重启httpd服务
# systemctl restart httpd # systemctl status httpd ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/httpd.service.d └─openstack-dashboard.conf Active: active (running) since Fri 2016-10-14 16:40:52 CST; 27min ago Docs: man:httpd(8) man:apachectl(8) Process: 89942 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) Process: 90015 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force (code=exited, status=0/SUCCESS) Process: 90007 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=0/SUCCESS) Main PID: 90044 (httpd) Status: "Total requests: 81; Current requests/sec: 0; Current traffic: 0 B/sec" CGroup: /system.slice/httpd.service ├─90044 /usr/sbin/httpd -DFOREGROUND ├─90046 /usr/sbin/httpd -DFOREGROUND ├─90047 (wsgi:keystone- -DFOREGROUND ├─90048 (wsgi:keystone- -DFOREGROUND ├─90049 (wsgi:keystone- -DFOREGROUND ├─90050 (wsgi:keystone- -DFOREGROUND ├─90051 (wsgi:keystone- -DFOREGROUND ├─90052 (wsgi:keystone- -DFOREGROUND ├─90053 (wsgi:keystone- -DFOREGROUND ├─90054 (wsgi:keystone- -DFOREGROUND ├─90055 (wsgi:keystone- -DFOREGROUND ├─90056 (wsgi:keystone- -DFOREGROUND ├─90057 /usr/sbin/httpd -DFOREGROUND ├─90058 /usr/sbin/httpd -DFOREGROUND ├─90059 /usr/sbin/httpd -DFOREGROUND ├─90061 /usr/sbin/httpd -DFOREGROUND ├─90156 /usr/sbin/httpd -DFOREGROUND ├─90157 /usr/sbin/httpd -DFOREGROUND ├─90158 /usr/sbin/httpd -DFOREGROUND ├─90260 /usr/sbin/httpd -DFOREGROUND ├─91346 /usr/sbin/httpd -DFOREGROUND └─91355 /usr/sbin/httpd -DFOREGROUND Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-af.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-ja.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-ar-DZ.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-ky.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-ar.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-lb.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-az.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-lt.min.js' Oct 14 16:40:41 bdc2 python[90007]: Copying '/usr/share/javascript/jquery_ui/ui/minified/i18n/jquery.ui.datepicker-be.min.js' Oct 14 16:40:52 bdc2 systemd[1]: Started The Apache HTTP Server.
相关文章推荐
- 安装NDK:Cygwin中出现-bash: $'\r': command not found 错误 的解决办法
- 编译linux内核时出现"mkimage" command not found - U-Boot images will not be built错误的解决办法
- python2 安装scrapy出现错误提示解决办法~
- [Centos] mod_wsgi 安装流程以及遇到问题解决办法。apxs: command not found 或 Sorry, Python developer package does not appear to be installed.
- windows下安装python出现2503错误的解决办法
- CentOS升级Python3.x.x后安装pip出现command not found 错误
- 在 Mac 中安装 MySQLdb (Python mysql )出现“mysql_config not found”错误的解决方法
- 使用yum命令安装软件时出现HTTP Error 404 NOT FOUND错误的解决办法
- Praat在CentOS 6.5中安装出现./praat /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.18' not found错误的解决办法
- kilo版本openstack的dashboard报错解决办法
- python mysql_config: command not found 安装 MySQL-python 的错误解决
- python2 安装scrapy出现错误提示解决办法~
- 安装Python扩展时,Configure error: Python headers not found错误解决办法
- 在Linux下安装PHP过程中,编译时出现configure: error: libjpeg.(a|so) not found 错误的解决办法
- 安装python模块时出现错误:UnicodeDecodeError: 'utf-8' codec ...的解决办法
- 用安装python模块出现error: command 'gcc' failed with exit status 1 ,实际已经安装了gcc的,还是报错,然后发觉是failed不是not found,这说明这个错误个gcc没多大关系,应该是缺少某些功能模块,执行如下操作:
- python3安装BeautifulSoup4时出现错误的解决办法
- 关于Python安装模块出现error: command 'gcc' failed with exit status 1错误的解决方法
- 升级10.11后使用CocoaPod出现-bash: pod: command not found 解决办法 及其CocoaPod的安装
- 关于出现错误:_tkinter.TclError: couldn't open "E:\Python系列\Python程序\Python安装.gif"tkinter中不能打开GIF格式图片的解决办法