无法安装libapache 2-mod-wsgi-py 3

ih99xse1  于 2022-12-23  发布在  Apache
关注(0)|答案(1)|浏览(324)

我在使用wsgi和使用apache API和运行我的django api时遇到了一些问题。我认为问题出在mod_wsgi. so上。我已经安装了libapache2-mod-wsgi,但是我的venv是使用python 3.6配置的。根据我的研究,我认为我需要libapache2-mod-wsgi-py3
尝试使用sudo yum install libapache2-mod-wsgi-py3安装时返回

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                                                                                                                                                                                                                                           | 3.7 kB  00:00:00
No package libapache2-mod-wsgi-py3 available.
Error: Nothing to do

错误日志显示:

Traceback (most recent call last):
[Tue Dec 20 19:02:24.660246 2022] [:error] [pid 13266]    File ".../project/project/wsgi.py", line 13, in <module>
[Tue Dec 20 19:02:24.660275 2022] [:error] [pid 13266]      from django.core.wsgi import get_wsgi_application
[Tue Dec 20 19:02:24.660283 2022] [:error] [pid 13266]    File ".../lib/python3.6/site-packages/django/__init__.py", line 1, in <module>
[Tue Dec 20 19:02:24.660295 2022] [:error] [pid 13266]      from django.utils.version import get_version
[Tue Dec 20 19:02:24.660302 2022] [:error] [pid 13266]    File ".../lib/python3.6/site-packages/django/utils/version.py", line 7, in <module>
[Tue Dec 20 19:02:24.660313 2022] [:error] [pid 13266]      from django.utils.regex_helper import _lazy_re_compile
[Tue Dec 20 19:02:24.660319 2022] [:error] [pid 13266]    File ".../lib/python3.6/site-packages/django/utils/regex_helper.py", line 10, in <module>
[Tue Dec 20 19:02:24.660330 2022] [:error] [pid 13266]      from django.utils.functional import SimpleLazyObject
[Tue Dec 20 19:02:24.660336 2022] [:error] [pid 13266]   File ".../lib/python3.6/site-packages/django/utils/functional.py", line 362, in <module>
[Tue Dec 20 19:02:24.660357 2022] [:error] [pid 13266]      class SimpleLazyObject(LazyObject):
[Tue Dec 20 19:02:24.660375 2022] [:error] [pid 13266]  TypeError: Error when calling the metaclass bases
[Tue Dec 20 19:02:24.660378 2022] [:error] [pid 13266]      'property' object is not callable
dwthyt8l

dwthyt8l1#

找出了包错误。对于任何想知道的人,我运行了yum search wsgi,发现libapache2-mod-wsgi-py3实际上是python3-mod_wsgi.x86_64

相关问题