安装 mod_wsgi 时如何修复错误消息?

Posted

技术标签:

【中文标题】安装 mod_wsgi 时如何修复错误消息?【英文标题】:How to fix an error message when installing mod_wsgi? 【发布时间】:2021-12-16 00:08:23 【问题描述】:

当我在我的 pycharm 终端(已激活 venv)中键入 pip install mod_wsgi 时,下面显示了一个错误,我在 python 38 上有 mod_wsgi(它已与 apache 中的项目 1 一起使用),我正在尝试安装我的 python 39 上的 mod_wsgi (以便我可以在我的其他项目中使用它)但失败了。谁能帮我解决这个错误?

错误:

 ERROR: Command errored out with exit status 1:
     command: 'c:\users\scs\pycharmprojects\role_based_login_system-master\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SCS\\AppData\\Local\\Temp\\pip-install-xs0tks5n\\mod-wsg
i_694922b5703e498c8e79a9fa99786895\\setup.py'"'"'; __file__='"'"'C:\\Users\\SCS\\AppData\\Local\\Temp\\pip-install-xs0tks5n\\mod-wsgi_694922b5703e498c8e79a9fa99786895\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__)
 if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\SC
S\AppData\Local\Temp\pip-record-r1pp8vy9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scs\pycharmprojects\role_based_login_system-master\venv\include\site\python3.9\mod-wsgi'
         cwd: C:\Users\SCS\AppData\Local\Temp\pip-install-xs0tks5n\mod-wsgi_694922b5703e498c8e79a9fa99786895\
    Complete output (215 lines):
    running install
    c:\users\scs\pycharmprojects\role_based_login_system-master\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build\lib.win32-3.9
    creating build\lib.win32-3.9\mod_wsgi
    copying src\__init__.py -> build\lib.win32-3.9\mod_wsgi
    creating build\lib.win32-3.9\mod_wsgi\server
    copying src\server\apxs_config.py -> build\lib.win32-3.9\mod_wsgi\server
    copying src\server\environ.py -> build\lib.win32-3.9\mod_wsgi\server
    copying src\server\__init__.py -> build\lib.win32-3.9\mod_wsgi\server
    creating build\lib.win32-3.9\mod_wsgi\server\management
    copying src\server\management\__init__.py -> build\lib.win32-3.9\mod_wsgi\server\management
    creating build\lib.win32-3.9\mod_wsgi\server\management\commands
    copying src\server\management\commands\runmodwsgi.py -> build\lib.win32-3.9\mod_wsgi\server\management\commands
    copying src\server\management\commands\__init__.py -> build\lib.win32-3.9\mod_wsgi\server\management\commands
    creating build\lib.win32-3.9\mod_wsgi\docs
    copying docs\_build\html\__init__.py -> build\lib.win32-3.9\mod_wsgi\docs
    creating build\lib.win32-3.9\mod_wsgi\images
    copying images\__init__.py -> build\lib.win32-3.9\mod_wsgi\images
    copying images\snake-whiskey.jpg -> build\lib.win32-3.9\mod_wsgi\images
    running build_ext
    building 'mod_wsgi.server.mod_wsgi' extension
    creating build\temp.win32-3.9
    creating build\temp.win32-3.9\Release
    creating build\temp.win32-3.9\Release\src
    creating build\temp.win32-3.9\Release\src\server
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win32-3.9\Rel
ease\src/server\mod_wsgi.obj
    mod_wsgi.c
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): warning C4005: 'PLATFORM': macro redefinition
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): note: see previous definition of 'PLATFORM'
    src/server\mod_wsgi.c(1331): warning C4244: 'function': conversion from '__int64' to 'Py_ssize_t', possible loss of data
    src/server\mod_wsgi.c(1624): warning C4244: 'function': conversion from 'apr_off_t' to 'std::apr_size_t', possible loss of data
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_apache.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_apache.obj
    wsgi_apache.c
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): warning C4005: 'PLATFORM': macro redefinition
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_buckets.c /Fobuild\temp.win32-3.9
\Release\src/server\wsgi_buckets.obj
    wsgi_buckets.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_convert.c /Fobuild\temp.win32-3.9
\Release\src/server\wsgi_convert.obj
    wsgi_convert.c
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_daemon.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_daemon.obj
    wsgi_daemon.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_interp.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_interp.obj
    wsgi_interp.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_logger.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_logger.obj
    wsgi_logger.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_memory.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_memory.obj
    wsgi_memory.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_metrics.c /Fobuild\temp.win32-3.9
\Release\src/server\wsgi_metrics.obj
    wsgi_metrics.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    src/server\wsgi_metrics.c(478): warning C4244: '=': conversion from 'apr_time_t' to 'double', possible loss of data
    src/server\wsgi_metrics.c(609): warning C4244: '=': conversion from 'apr_time_t' to 'double', possible loss of data
    src/server\wsgi_metrics.c(390): warning C4244: 'initializing': conversion from 'double' to 'apr_uint64_t', possible loss of data
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_restrict.c /Fobuild\temp.win32-3.
9\Release\src/server\wsgi_restrict.obj
    wsgi_restrict.c
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_server.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_server.obj
    wsgi_server.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_stream.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_stream.obj
    wsgi_stream.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_thread.c /Fobuild\temp.win32-3.9\
Release\src/server\wsgi_thread.obj
    wsgi_thread.c
    c:\wamp64\bin\apache\apache2.4.46\include\os.h(44): warning C4005: 'PLATFORM': macro redefinition
    c:\users\scs\appdata\local\programs\python\python39-32\include\pyconfig.h(300): note: see previous definition of 'PLATFORM'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\wamp64\bin\apache\apache2.4.46/include -Ic:\users\scs\pycharmprojects\role_based_login_system-master\venv\include -IC:\Users
\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Users\SCS\AppData\Local\Programs\Python\Python39-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Tcsrc/server\wsgi_validate.c /Fobuild\temp.win32-3.
9\Release\src/server\wsgi_validate.obj
    wsgi_validate.c
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\scs\pycharmprojects\role_based_login_system-master\venv\libs /LIBPATH:C:\
Users\SCS\AppData\Local\Programs\Python\Python39-32\libs /LIBPATH:C:\Users\SCS\AppData\Local\Programs\Python\Python39-32 /LIBPATH:c:\users\scs\pycharmprojects\role_based_login_system-master\venv\PCbuild\win32 /LIBPATH:C:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\LIB /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x86 /LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86 /EXPORT:PyInit_mod_wsgi build\temp.win32-3.9\Releas
e\src/server\mod_wsgi.obj build\temp.win32-3.9\Release\src/server\wsgi_apache.obj build\temp.win32-3.9\Release\src/server\wsgi_buckets.obj build\temp.win32-3.9\Release\src/server\wsgi_convert.obj build\temp.win32-3.9\Release\src/server
\wsgi_daemon.obj build\temp.win32-3.9\Release\src/server\wsgi_interp.obj build\temp.win32-3.9\Release\src/server\wsgi_logger.obj build\temp.win32-3.9\Release\src/server\wsgi_memory.obj build\temp.win32-3.9\Release\src/server\wsgi_metri
cs.obj build\temp.win32-3.9\Release\src/server\wsgi_restrict.obj build\temp.win32-3.9\Release\src/server\wsgi_server.obj build\temp.win32-3.9\Release\src/server\wsgi_stream.obj build\temp.win32-3.9\Release\src/server\wsgi_thread.obj bu
ild\temp.win32-3.9\Release\src/server\wsgi_validate.obj /OUT:build\lib.win32-3.9\mod_wsgi\server\mod_wsgi.cp39-win32.pyd /IMPLIB:build\temp.win32-3.9\Release\src/server\mod_wsgi.cp39-win32.lib C:\Users\SCS\AppData\Local\Programs\Python
\Python39-32/libs/python39.lib C:\wamp64\bin\apache\apache2.4.46/lib/libhttpd.lib C:\wamp64\bin\apache\apache2.4.46/lib/libapr-1.lib C:\wamp64\bin\apache\apache2.4.46/lib/libaprutil-1.lib C:\wamp64\bin\apache\apache2.4.46/lib/libaprico
nv-1.lib
       Creating library build\temp.win32-3.9\Release\src/server\mod_wsgi.cp39-win32.lib and object build\temp.win32-3.9\Release\src/server\mod_wsgi.cp39-win32.exp
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_brigade_flatten@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_thread_mutex_create@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_ipsubnet_test@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pool_cleanup_register@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_satisfies@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_getword_conf@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pstrndup@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_threadkey_private_create@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_hash_overlay@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_get_remote_host@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_document_root@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_some_auth_required@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_no2slash@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_brigade_create@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_strerror@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_make@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_check_cmd_context@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_brigade_destroy@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_elts@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_get_brigade@24
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_array_push@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_get_server_port@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_brigade_cleanup@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_array_append@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_get_scoreboard_global@0
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_ipsubnet_create@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pstrdup@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_strtoi64@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_get_limit_req_body@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_add@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_escape_html2@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_thread_mutex_lock@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_sockaddr_info_get@24
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_hook_handler@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_register_provider@20
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_discard_request_body@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pool_userdata_set@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_find_path_info@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_regexec@20
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_pregsub@20
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_transient_create@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_add_version_component@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_psprintf
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_hook_access_checker@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_add_cgi_vars@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_unset@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_psignature@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_thread_mutex_unlock@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_allow_options@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_get_server_name@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_hook_child_init@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_dynamic_fn_retrieve@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_set_content_type@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_log_error_
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pool_userdata_get@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pstrcat
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_flush_create@4
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_type_eos
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_off_t_toa@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_log_rerror_
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_array_make@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_hash_get@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_hook_post_config@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_get@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_run_generate_log_id@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_pass_brigade@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pstrmemdup@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_setn@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__ap_pregcomp@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_stat@16
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_array_cat@8
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_table_set@12
    mod_wsgi.obj : error LNK2001: unresolved external symbol __imp__apr_pool_cleanup_null
    wsgi_apache.obj : error LNK2001: unresolved external symbol __imp__apr_conv_utf8_to_ucs2@16
    wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_shared_make@20
    wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_shared_copy
    wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_free
    wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_alloc
    wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_shared_destroy@4
    wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_bucket_shared_split
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__ap_show_mpm@0
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__apr_hash_pool_get@4
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__apr_hash_next@4
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__apr_hash_this@16
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__apr_hash_first@8
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__ap_get_server_description@0
    wsgi_interp.obj : error LNK2001: unresolved external symbol __imp__ap_get_server_built@0
    wsgi_metrics.obj : error LNK2001: unresolved external symbol __imp__ap_get_scoreboard_process@4
    wsgi_metrics.obj : error LNK2001: unresolved external symbol __imp__ap_get_scoreboard_worker_from_indexes@8
    wsgi_metrics.obj : error LNK2001: unresolved external symbol __imp__ap_exists_scoreboard_image@0
    wsgi_thread.obj : error LNK2001: unresolved external symbol __imp__apr_threadkey_private_get@8
    wsgi_thread.obj : error LNK2001: unresolved external symbol __imp__apr_threadkey_private_set@8
    build\lib.win32-3.9\mod_wsgi\server\mod_wsgi.cp39-win32.pyd : fatal error LNK1120: 106 unresolved externals
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit code 1120
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\scs\pycharmprojects\role_based_login_system-master\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SCS\\AppData\\Local\\Te
mp\\pip-install-xs0tks5n\\mod-wsgi_694922b5703e498c8e79a9fa99786895\\setup.py'"'"'; __file__='"'"'C:\\Users\\SCS\\AppData\\Local\\Temp\\pip-install-xs0tks5n\\mod-wsgi_694922b5703e498c8e79a9fa99786895\\setup.py'"'"';f = getattr(tokenize
, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'
))' install --record 'C:\Users\SCS\AppData\Local\Temp\pip-record-r1pp8vy9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\scs\pycharmprojects\role_based_login_system-master\venv\include\sit
e\python3.9\mod-wsgi' Check the logs for full command output.

【问题讨论】:

【参考方案1】:

您遇到的问题可能是由 32 位程序与 64 位程序混合引起的。您使用的程序必须全部为 64 位或全部为 32 位。它们不能混合。如果您的操作系统是 64 位,建议您使用 64 位。

决定继续使用 64 位还是 32 位。删除/卸载与您决定使用的程序不同的程序。使用与其他程序相同的位重新安装该程序。

【讨论】:

所以我的 python、pycharm 和 XAMPP 必须都是 64 位的? 不一定是 64 位,它们必须相互匹配,最好与您的计算机匹配。您的 python pycharm 和 XAMPP 必须全部相同,因此全部为 64 或全部为 32。如果您的计算机是 64 位,您可以选择使用 64 位应用程序或 32 位,但此选项可能导致混合应用程序存在在同一台计算机上。如果你的电脑是 32 位的,一切都必须是 32 位的。 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center。

以上是关于安装 mod_wsgi 时如何修复错误消息?的主要内容,如果未能解决你的问题,请参考以下文章

如何在从 xampp 包安装的 apache 服务器上安装 mod_wsgi?

如何在 Ubuntu 上将 mod_wsgi 安装到 xampp 服务器?遇到 libtool 错误

为 Python 3.7 virtualenv 安装 mod_wsgi

在 Debian 9/10 上为 python 3.8 安装 mod_wsgi

安装 mod_wsgi 时出错

如何在Ubuntu中将mod_wsgi安装到特定的python版本?