Centos7安装uwsgi出现关于SSL错误的问题

mac2026-06-21  0

问题如下

core/subscription.o: In function `uwsgi_remove_subscribe_node': subscription.c:(.text+0x942): undefined reference to `EVP_MD_CTX_free' subscription.c:(.text+0x991): undefined reference to `EVP_MD_CTX_free' core/subscription.o: In function `subscription_new_sign_ctx': subscription.c:(.text+0x13c5): undefined reference to `EVP_MD_CTX_new' subscription.c:(.text+0x1456): undefined reference to `EVP_MD_CTX_free' core/ssl.o: In function `uwsgi_ssl_init': ssl.c:(.text+0xa9): undefined reference to `OPENSSL_init_ssl' ssl.c:(.text+0xb5): undefined reference to `OPENSSL_init_ssl' ssl.c:(.text+0xc1): undefined reference to `OPENSSL_init_crypto' core/ssl.o: In function `uwsgi_ssl_new_server_context': ssl.c:(.text+0x200): undefined reference to `TLS_server_method' ssl.c:(.text+0x2e5): undefined reference to `SSL_CTX_set_options' ssl.c:(.text+0x321): undefined reference to `SSL_CTX_set_options' ssl.c:(.text+0x53e): undefined reference to `SSL_CTX_set_options' core/ssl.o: In function `uwsgi_rsa_sign': ssl.c:(.text+0x7ac): undefined reference to `EVP_MD_CTX_new' ssl.c:(.text+0x832): undefined reference to `EVP_MD_CTX_free' ssl.c:(.text+0x955): undefined reference to `EVP_MD_CTX_free' core/ssl.o: In function `uwsgi_sni_cb': ssl.c:(.text+0xe1b): undefined reference to `SSL_CTX_get_options' ssl.c:(.text+0xe26): undefined reference to `SSL_set_options' collect2: error: ld returned 1 exit status *** error linking uWSGI *** ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jx63zvlz/uwsgi/setup.py'"'"';all-jx63zvlz/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"cord /tmp/pip-record-uzoxgmp4/install-record.txt --single-version-externalle logs for full command output.

上面还省略了很长一段,在此之前我已经安装了openssl-devel, 在此之前有在别地方看到说通过anaconda安装uwsgi,因为不想去再安装anaconda就没有尝试这个方式: https://github.com/unbit/uwsgi/issues/1516

github上的解决方案2:https://github.com/unbit/uwsgi/issues/1516

我的问题以及解决方法:

卸载openssl-devel

我的问题是之前通过yum安装了openssl-devel,但是使用pip命令时还是出现ssl报错,因为pip命令用不了,所以又通过源码编译安装了新的OpenSSL(OpenSSL 1.1.1a),但是忘记卸载了yum安装的OpenSSL(openssl-devel-1.0.2),估计是这两个冲突了,卸载yum安装的OpenSSL后就好了,白忙活了好一阵


 卸载OpenSSL      yum remove openssl-devel

查看OpenSSL版本    openssl version

 

 

 

最新回复(0)