簡體   English   中英

centos 7,編譯 python 3.10,未定義符號 GENERAL_NAME_free

[英]centos 7, compiled python 3.10, undefined symbol GENERAL_NAME_free

我在嘗試啟動在虛擬環境中使用 mod_wsgi 4.9.1 的 apache 時遇到錯誤。

在我的centos 7系統上,我編譯了python 3.10,它被altinstalled到/usr/local/bin/python3.10

我有一個 virtualenv,但最初可能是用早期版本的 python 3.10 構建了 mod_wsgi(我無法讓 python 正確構建)。 但是,我最后一次嘗試使用

pip install --ignore-installed --no-cache-dir mod_wsgi==4.9.1 --no-binary mod_wsgi

嘗試使用最新的 python3.10 構建它(我嘗試了幾個 pip 安裝,從--no-cache-dir開始)

注意我正在嘗試將幾個應用程序升級到 python3.10,從 centos7 yum 安裝 python 3.6,mod_wsgi 4.7.0,它正在工作。 所以這可能與我的 python 安裝有關,或者將 mod_wsgi 連接到 python 安裝。

我嘗試運行mod_wsgi-express setup-server ,並得到這些結果

$ sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/custom-openssl/lib /root/bin/init-mod_wsgi-express runningroutes sandbox.routes.loutilities.com routesmgr routesmgr 8002
Server URL         : http://proxysvr.loutilities.com:8002/
Server Root        : /etc/mod_wsgi-express/sandbox.routes.loutilities.com
Server Conf        : /etc/mod_wsgi-express/sandbox.routes.loutilities.com/httpd.conf
Error Log File     : /etc/mod_wsgi-express/sandbox.routes.loutilities.com/error_log (warn)
Rewrite Rules      : /etc/mod_wsgi-express/sandbox.routes.loutilities.com/rewrite.conf
Environ Variables  : /etc/mod_wsgi-express/sandbox.routes.loutilities.com/envvars
Control Script     : /etc/mod_wsgi-express/sandbox.routes.loutilities.com/apachectl
Operating Mode     : daemon
Request Capacity   : 5 (1 process * 5 threads)
Request Timeout    : 60 (seconds)
Startup Timeout    : 15 (seconds)
Queue Backlog      : 100 (connections)
Queue Timeout      : 45 (seconds)
Server Capacity    : 20 (event/worker), 20 (prefork)
Server Backlog     : 500 (connections)
Locale Setting     : en_US.UTF-8

在哪里

$ sudo cat /root/bin/init-mod_wsgi-express
#!/bin/bash
if [[ $# -lt 5 ]] ; then
   echo "usage:"
   echo "    init-mod_wsgi-express project servername user group port"
   exit 0
fi

source /var/www/$2/venv/bin/activate
mod_wsgi-express setup-server --server-name proxysvr.loutilities.com --port $5 --user $3 --group $4 /var/www/$2/$1/$1/$1.wsgi --working-directory /var/www/$2/$1/$1/ --server-root /etc/mod_wsgi-express/$2
deactivate

但我在嘗試啟動創建的 apachectl 文件時看到錯誤

$ sudo /etc/mod_wsgi-express/sandbox.routes.loutilities.com/apachectl start
httpd (mod_wsgi-express): Syntax error on line 163 of /etc/mod_wsgi-express/sandbox.routes.loutilities.com/httpd.conf: Cannot load /var/www/sandbox.routes.loutilities.com/venv/lib/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-x86_64-linux-gnu.so into server: /var/www/sandbox.routes.loutilities.com/venv/lib/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-x86_64-linux-gnu.so: undefined symbol: GENERAL_NAME_free

我從 python 構建目錄中注意到以下內容

$ grep -R GENERAL_NAME_free . 
./Modules/_ssl.c: sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free); 
Binary file ./Modules/_ssl.o matches 
Binary file ./python matches 
Binary file ./libpython3.10.a matches Binary file 
./Programs/_testembed matches

libpython3.10.a/usr/local/lib/usr/local/lib/python3.10/config-3.10-x86_64-linux-gnu

$ find /usr/local/lib -name libpython3.10.a
/usr/local/lib/libpython3.10.a
/usr/local/lib/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10.a

我不確定應該如何設置虛擬環境中的 mod_wsgi 來查找丟失的庫文件。

我應該采取哪些其他調試步驟?

請注意,大約一周前我還發布到https://groups.google.com/g/modwsgi ,但沒有看到任何回復。

這在https://groups.google.com/g/modwsgi/c/KZZQHpFclGA/m/9St6XuSRAAAJ中得到了回答

本質上,問題在於 python 使用的 openssl 與 apache 不同。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM