安装openstack时apache无法启动

来源:互联网 发布:java开发的小游戏 编辑:程序博客网 时间:2024/06/03 04:27

在CentOS 7 上 安装openstack-dashboard时httpd服务启动失败

出现如下的报错信息:

May 22 09:17:05 controller0 python[3431]: CommandError: An error occurred during rendering /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html: /bin/sh: django_pyscss.compressor.DjangoScssFilter: command not found

May 22 09:17:05 controller0 python[3431]: Found 'compress' tags in:
May 22 09:17:05 controller0 python[3431]: /usr/lib/python2.7/site-packages/horizon/templates/horizon/_conf.html
May 22 09:17:05 controller0 python[3431]: /usr/share/openstack-dashboard/openstack_dashboard/templates/_stylesheets.html
May 22 09:17:05 controller0 python[3431]: /usr/lib/python2.7/site-packages/horizon/templates/horizon/_scripts.html
May 22 09:17:05 controller0 python[3431]: Compressing...
May 22 09:17:05 controller0 systemd[1]: httpd.service: control process exited, code=exited status=1
May 22 09:17:05 controller0 systemd[1]: Failed to start The Apache HTTP Server.

centos7 中的python版本为2.7

django-pyscss的版本为要在2.0以上才能正常使用,而自带版本为:

[root@controller0 ~]# yum list|grep django-pyscss
python-django-pyscss.noarch             1.0.5-2.el7              @epel          


所以需要更新django-pyscss版本,过程如下:

1、 首先安装 pip

参照:  PIP Installation

2、 安装新版本django-pyscss

[root@controller0 tmp]#pip install django-pyscss==2.0.2

[root@controller0 tmp]# pip list | grep pyscss

django-pyscss (2.0.2)


重新启动httpd

systemctl start httpd.service



原创粉丝点击