2019独角兽企业重金招聘Python工程师标准>>>

安装openstack-dashboard时出现的python compress command not found错误解决办法

httpd服务启动失败

# systemctl status httpd
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)Drop-In: /usr/lib/systemd/system/httpd.service.d└─openstack-dashboard.confActive: failed (Result: exit-code) since Fri 2016-10-14 16:13:27 CST; 25s agoDocs: 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 ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)Drop-In: /usr/lib/systemd/system/httpd.service.d└─openstack-dashboard.confActive: active (running) since Fri 2016-10-14 16:40:52 CST; 27min agoDocs: 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 -DFOREGROUNDOct 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.

转载于:https://my.oschina.net/xiaozhublog/blog/758661

安装kilo版本openstack-dashboard时出现的python compress command not found错误解决办法相关推荐

  1. 老是说我编译版本不够_编译etcd出现的cannot load bufio的错误解决办法

    编译etcd出现的cannot load bufio的错误解决办法 今天在安装编译etcd的时候,出现以下错误: go: finding github.com/golang/groupcache v0 ...

  2. Windows10 安装软件时提示“ the error code is 2503/2502”错误解决办法

    问题内容:Windows10 安装软件时提示" the error code is 2503/2502"错误代码 分析原因:由于安装.msi格式的软件时,无法使用管理员身份运行,导 ...

  3. 3dmax打开错误html,安装3dmax出现错误怎么办?3dmax出现错误解决办法

    安装3dmax出现command line option syntax error./type command for help错误解决办法!如果点击确定,安装直接结束~安装不成功! 解决方案信息: ...

  4. PHP编译安装时常见错误解决办法,php编译常见错误

    PHP编译安装时常见错误解决办法,php编译常见错误 1.configure: error: xslt-config not found. Please reinstall the libxslt & ...

  5. linux libvpx编译安装,linux编译安装时常见错误解决办法

    **configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution** 复 ...

  6. linux编译安装的报错,linux编译安装时常见错误解决办法

    This article is post on https://coderwall.com/p/ggmpfa 原文链接:http://www.bkjia.com/PHPjc/1008013.html ...

  7. SQL安装时出现挂起的文件操作”错误解决办法

    SQL安装时出现"以前的某个程序安装已在安装计算机上创建挂起的文件操作--"错误解决办法 打开注册表编辑器(或在命令行输入:regedit),在HKEY_LOCAL_MACHINE ...

  8. 安装Mysql时出现服务未启动(start service)解决办法

    安装Mysql时出现服务未启动(start service)解决办法 1.去控制面板卸载 2.删除Mysql卸载残留文件 3.管理员删除mysql服务 4.重新安装(注意事项!!!) 1.去控制面板卸 ...

  9. 手机安装软件解析包错误解决办法

    下载了一款新的APP,满心欢喜的正准备体验的时候,却发现出现了"解析包时出现问题"之类的提示,连安装都无法成功,这样的体验肯定非常不妙.那么安卓解析包出现问题时有没有好的解决办法呢 ...

最新文章

  1. 顺序特征选择器(SequentialFeatureSelector (SFS))
  2. 校宝在线携手神策数据 数据赋能产品服务体验双升级
  3. px4官网调参指南 多旋翼无人机PID调参指南
  4. 学习ecshop 教程网址
  5. php 无法加载css文件,解决ThinkPHP样式无法加载问题(CSS,JS),
  6. Introducing Blackle, the energy saving search
  7. 前景背景分离方法(二)高斯混合模型法GMM(Gaussian Mixture Model)
  8. (转)这是券商对金融科技最看重的一年!
  9. HDU2093--考试排名
  10. 三个一工程_C语言阶段第二阶段部分程序整理
  11. 子图数正方形和长方形数量
  12. Class6-Image Segmentation
  13. 立创商城的元件原理图怎么弄到ad_立创EDA元件封装导入AD软件教程
  14. Linux Ubuntu NVIDIA双显卡切换intel显卡方法, 如果无法正常切换
  15. yolov2 损失函数_深度学习计算机视觉之YOLO,YOLOv2和YOLOv3算法(超详细解析)
  16. Android无线WiFi调试项目adbwifi摆脱数据线拔插烦恼无轻松远程调试
  17. python获取路由器数据包pppoe_利用PPPOE获取路由器中宽带账号密码
  18. 使用adb命令从电脑传文件到手机
  19. 二进制安全之NX绕过方法--ROP技术
  20. 扫雷游戏是一款十分经典的单机小游戏。 问题 H: 扫雷游戏

热门文章

  1. IOS笔记本----读写.plist文件
  2. GNOME Menu File Browser-快速导航用户目次
  3. TiDB Ecosystem Tools 原理解读系列(二)TiDB-Lightning Toolset 介绍
  4. 更新版-梳理前端开发使用eslint和prettier来检查和格式化代码问题
  5. 【Python】从文件中读取数据
  6. 【印象】2016云栖大会城市峰会:上海、深圳、南京、北京等精彩复现
  7. 新浪微博封装类,以及常见问题sdk修改
  8. 栅格数据的像素值保存问题
  9. [转]获取Setup文件的运行路径
  10. Hibernate连接池配置实例