中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》
  • 首頁 > 
  • 教程 > 
  • 服務器 > 
  • 云計算 > 
  • 安裝kilo版本openstack-dashboard時出現的python compress command not found錯誤怎么辦

安裝kilo版本openstack-dashboard時出現的python compress command not found錯誤怎么辦

發布時間:2021-11-16 10:59:42 來源:億速云 閱讀:342 作者:小新 欄目:云計算

小編給大家分享一下安裝kilo版本openstack-dashboard時出現的python compress  command not found錯誤怎么辦,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!

安裝openstack-dashboard時出現的python compress command not found錯誤解決辦法

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.

看完了這篇文章,相信你對“安裝kilo版本openstack-dashboard時出現的python compress  command not found錯誤怎么辦”有了一定的了解,如果想了解更多相關知識,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

达州市| 察哈| 金乡县| 武威市| 襄汾县| 天台县| 苏州市| 察哈| 廉江市| 保靖县| 平舆县| 泗洪县| 铜川市| 嵊泗县| 北川| 济南市| 介休市| 赤壁市| 阜康市| 商都县| 辰溪县| 嘉黎县| 喀喇沁旗| 南阳市| 陆良县| 阜新| 观塘区| 隆化县| 彭水| 伊宁县| 玉林市| 香格里拉县| 十堰市| 新野县| 乌拉特前旗| 兰西县| 盘山县| 哈巴河县| 禄丰县| 肥城市| 科技|