python - uwsgi 安装报错
PHP中文网
PHP中文网 2017-04-18 09:34:19
0
1
1939

pip install uwsgi 失败

Collecting uwsgi
  Using cached uwsgi-2.0.13.1.tar.gz
Installing collected packages: uwsgi
  Running setup.py install for uwsgi ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-omVSJq/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-SEw5pP-record/install-record.txt --single-version-externally-managed --compile:
    running install
    using profile: buildconf/default.ini
    detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/5/include', '/usr/local/include', '/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed', '/usr/include/x86_64-linux-gnu', '/usr/include']
    Patching "bin_name" to properly install_scripts dir
    detected CPU cores: 1
    configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -I/usr/local/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_VERSION="\"2.0.13.1\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="13" -DUWSGI_VERSION_REVISION="1" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
    *** uWSGI compiling server core ***
    [x86_64-linux-gnu-gcc -pthread] core/utils.o
    [x86_64-linux-gnu-gcc -pthread] core/protocol.o
    [x86_64-linux-gnu-gcc -pthread] core/socket.o
    [x86_64-linux-gnu-gcc -pthread] core/logging.o
    [x86_64-linux-gnu-gcc -pthread] core/master.o
    [x86_64-linux-gnu-gcc -pthread] core/master_utils.o
    [x86_64-linux-gnu-gcc -pthread] core/emperor.o
    [x86_64-linux-gnu-gcc -pthread] core/notify.o
    [x86_64-linux-gnu-gcc -pthread] core/mule.o
    [x86_64-linux-gnu-gcc -pthread] core/subscription.o
    [x86_64-linux-gnu-gcc -pthread] core/stats.o
    [x86_64-linux-gnu-gcc -pthread] core/sendfile.o
    [x86_64-linux-gnu-gcc -pthread] core/async.o
    [x86_64-linux-gnu-gcc -pthread] core/master_checks.o
    [x86_64-linux-gnu-gcc -pthread] core/fifo.o
    [x86_64-linux-gnu-gcc -pthread] core/offload.o
    [x86_64-linux-gnu-gcc -pthread] core/io.o
    [x86_64-linux-gnu-gcc -pthread] core/static.o
    [x86_64-linux-gnu-gcc -pthread] core/websockets.o
    [x86_64-linux-gnu-gcc -pthread] core/spooler.o
    [x86_64-linux-gnu-gcc -pthread] core/snmp.o
    [x86_64-linux-gnu-gcc -pthread] core/exceptions.o
    [x86_64-linux-gnu-gcc -pthread] core/config.o
    [x86_64-linux-gnu-gcc -pthread] core/setup_utils.o
    [x86_64-linux-gnu-gcc -pthread] core/clock.o
    [x86_64-linux-gnu-gcc -pthread] core/init.o
    [x86_64-linux-gnu-gcc -pthread] core/buffer.o
    [x86_64-linux-gnu-gcc -pthread] core/reader.o
    [x86_64-linux-gnu-gcc -pthread] core/writer.o
    [x86_64-linux-gnu-gcc -pthread] core/alarm.o
    [x86_64-linux-gnu-gcc -pthread] core/cron.o
    [x86_64-linux-gnu-gcc -pthread] core/hooks.o
    [x86_64-linux-gnu-gcc -pthread] core/plugins.o
    [x86_64-linux-gnu-gcc -pthread] core/lock.o
    [x86_64-linux-gnu-gcc -pthread] core/cache.o
    [x86_64-linux-gnu-gcc -pthread] core/daemons.o
    [x86_64-linux-gnu-gcc -pthread] core/errors.o
    [x86_64-linux-gnu-gcc -pthread] core/hash.o
    [x86_64-linux-gnu-gcc -pthread] core/master_events.o
    [x86_64-linux-gnu-gcc -pthread] core/chunked.o
    [x86_64-linux-gnu-gcc -pthread] core/queue.o
    [x86_64-linux-gnu-gcc -pthread] core/event.o
    [x86_64-linux-gnu-gcc -pthread] core/signal.o
    [x86_64-linux-gnu-gcc -pthread] core/strings.o
    [x86_64-linux-gnu-gcc -pthread] core/progress.o
    [x86_64-linux-gnu-gcc -pthread] core/timebomb.o
    [x86_64-linux-gnu-gcc -pthread] core/ini.o
    [x86_64-linux-gnu-gcc -pthread] core/fsmon.o
    [x86_64-linux-gnu-gcc -pthread] core/mount.o
    [x86_64-linux-gnu-gcc -pthread] core/metrics.o
    [x86_64-linux-gnu-gcc -pthread] core/plugins_builder.o
    [x86_64-linux-gnu-gcc -pthread] core/sharedarea.o
    [x86_64-linux-gnu-gcc -pthread] core/rpc.o
    [x86_64-linux-gnu-gcc -pthread] core/gateway.o
    [x86_64-linux-gnu-gcc -pthread] core/loop.o
    [x86_64-linux-gnu-gcc -pthread] core/cookie.o
    [x86_64-linux-gnu-gcc -pthread] core/querystring.o
    [x86_64-linux-gnu-gcc -pthread] core/rb_timers.o
    [x86_64-linux-gnu-gcc -pthread] core/transformations.o
    [x86_64-linux-gnu-gcc -pthread] core/uwsgi.o
    [x86_64-linux-gnu-gcc -pthread] proto/base.o
    [x86_64-linux-gnu-gcc -pthread] proto/uwsgi.o
    [x86_64-linux-gnu-gcc -pthread] proto/http.o
    [x86_64-linux-gnu-gcc -pthread] proto/fastcgi.o
    [x86_64-linux-gnu-gcc -pthread] proto/scgi.o
    [x86_64-linux-gnu-gcc -pthread] proto/puwsgi.o
    [x86_64-linux-gnu-gcc -pthread] lib/linux_ns.o
    [x86_64-linux-gnu-gcc -pthread] core/zlib.o
    [x86_64-linux-gnu-gcc -pthread] core/regexp.o
    [x86_64-linux-gnu-gcc -pthread] core/routing.o
    [x86_64-linux-gnu-gcc -pthread] core/yaml.o
    [x86_64-linux-gnu-gcc -pthread] core/ssl.o
    core/ssl.c: In function ‘uwsgi_ssl_init’:
    core/ssl.c:17:9: error: ‘OPENSSL_config’ is deprecated [-Werror=deprecated-declarations]
             OPENSSL_config(NULL);
             ^
    In file included from /usr/local/include/openssl/crypto.h:32:0,
                     from /usr/local/include/openssl/bio.h:20,
                     from /usr/local/include/openssl/conf.h:13,
                     from ./uwsgi.h:356,
                     from core/ssl.c:1:
    /usr/local/include/openssl/conf.h:92:1: note: declared here
     DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
     ^
    core/ssl.c: In function ‘uwsgi_ssl_info_cb’:
    core/ssl.c:26:24: error: dereferencing pointer to incomplete type ‘SSL {aka const struct ssl_st}’
                     if (ssl->s3) {
                            ^
    core/ssl.c: In function ‘uwsgi_ssl_session_new_cb’:
    core/ssl.c:62:69: error: dereferencing pointer to incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
             if (uwsgi_cache_set2(uwsgi.ssl_sessions_cache, (char *) sess->session_id, sess->session_id_length, session_blob, len, uwsgi.ssl_sessions_timeout, 0)) {
                                                                         ^
    core/ssl.c: In function ‘uwsgi_ssl_new_server_context’:
    core/ssl.c:408:46: error: passing argument 2 of ‘SSL_CTX_sess_set_get_cb’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                     SSL_CTX_sess_set_get_cb(ctx, uwsgi_ssl_session_get_cb);
                                                  ^
    In file included from ./uwsgi.h:357:0,
                     from core/ssl.c:1:
    /usr/local/include/openssl/ssl.h:618:6: note: expected ‘SSL_SESSION * (*)(struct ssl_st *, const unsigned char *, int,  int *) {aka struct ssl_session_st * (*)(struct ssl_st *, const unsigned char *, int,  int *)}’ but argument is of type ‘SSL_SESSION * (*)(SSL *, unsigned char *, int,  int *) {aka struct ssl_session_st * (*)(struct ssl_st *, unsigned char *, int,  int *)}’
     void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
          ^
    cc1: all warnings being treated as errors

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-omVSJq/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-SEw5pP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-omVSJq/uwsgi/
PHP中文网
PHP中文网

认证高级PHP讲师

全員に返信(1)
伊谢尔伦

コンパイル結果から、OpenSSL のバージョンが低すぎる、特に 1.1.0 より低いことが問題であることがわかります。openssl と openssl-devel の上位バージョンをインストールしてから、uwsgi を再インストールできます。

主に以下のコンパイル エラー メッセージから、OPENSSL_config(NULL) を呼び出すこの関数に問題があることがわかりました。 :

リーリー

次に、uwsgi コード core/ssl.c (https://github.com/unbit/uwsg...) を確認すると、次のステートメントが見つかります:

リーリー

マクロ定義は、openssl バージョンが 1.1.0 未満の場合にのみ、放棄された OPENSSL_config 関数が呼び出されることを示しています。
したがって、openssl バージョン 1.1.0 以降をインストールすると、問題は解決されるはずです。

いいねを押す +0
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!