当我尝试加载 cobbler 2.8.4 网页时,我在 /var/log/httpd/ssl_error_log 中看到以下错误
Traceback (most recent call last):
File "/usr/share/cobbler/web/cobbler.wsgi", line 26, in application
_application = get_wsgi_application()
File "/usr/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
django.setup(set_prefix=False)
File "/usr/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/share/cobbler/web/settings.py", line 89, in <module>
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
ImportError: cannot import name TEMPLATE_CONTEXT_PROCESSORS
python2-django-1.11.20-1.el7.noarch
cobbler-2.8.4-4.el7.x86_64
cobbler-web-2.8.4-4.el7.noarch
答案1
EPEL 中的 Django 似乎已更新至 1.11,这在以下方面做出了一些更改:上下文处理器已处理。cobbler 尝试在此处调用的代码已弃用,并在一段时间前从 Django 中删除,因此 cobbler 需要更新。在 Red Hat Bugzilla 中提交针对 cobbler 的错误报告。