Paw*_*man 2 ubuntu uwsgi ubuntu-22.04
我有一个全新的 Ubuntu 22.04 安装。我已经安装了 build-essentials 和 python3-dev。
\n当我尝试时,pip install uwsgi我得到以下输出:
Collecting uwsgi\n Using cached uwsgi-2.0.20.tar.gz (804 kB)\n Preparing metadata (setup.py) ... done\nUsing legacy 'setup.py install' for uwsgi, since package 'wheel' is not installed.\nInstalling collected packages: uwsgi\n Running setup.py install for uwsgi ... error\n error: subprocess-exited-with-error\n \n \xc3\x97 Running setup.py install for uwsgi did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [265 lines of output]\n /usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'descriptions'\n warnings.warn(msg)\n running install\n /opt/virtualenv/test_env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n warnings.warn(\n using profile: buildconf/default.ini\n detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/11/include', '/usr/local/include', '/usr/include/x86_64-linux-gnu', '/usr/include']\n Patching "bin_name" to properly install_scripts dir\n detected CPU cores: 2\n configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -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 -DUWSGI_VERSION="\\"2.0.20\\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="20" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\\"\\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_XML -DUWSGI_XML_EXPAT -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);"\n *** uWSGI compiling server core ***\n [thread 1][x86_64-linux-gnu-gcc] core/utils.o\n [thread 0][x86_64-linux-gnu-gcc] core/protocol.o\n [thread 0][x86_64-linux-gnu-gcc] core/socket.o\n [thread 0][x86_64-linux-gnu-gcc] core/logging.o\n [thread 1][x86_64-linux-gnu-gcc] core/master.o\n [thread 1][x86_64-linux-gnu-gcc] core/master_utils.o\n [thread 0][x86_64-linux-gnu-gcc] core/emperor.o\n [thread 1][x86_64-linux-gnu-gcc] core/notify.o\n [thread 0][x86_64-linux-gnu-gcc] core/mule.o\n [thread 1][x86_64-linux-gnu-gcc] core/subscription.o\n [thread 0][x86_64-linux-gnu-gcc] core/stats.o\n [thread 1][x86_64-linux-gnu-gcc] core/sendfile.o\n [thread 0][x86_64-linux-gnu-gcc] core/async.o\n [thread 1][x86_64-linux-gnu-gcc] core/master_checks.o\n [thread 0][x86_64-linux-gnu-gcc] core/fifo.o\n [thread 1][x86_64-linux-gnu-gcc] core/offload.o\n [thread 0][x86_64-linux-gnu-gcc] core/io.o\n [thread 1][x86_64-linux-gnu-gcc] core/static.o\n [thread 1][x86_64-linux-gnu-gcc] core/websockets.o\n [thread 0][x86_64-linux-gnu-gcc] core/spooler.o\n [thread 1][x86_64-linux-gnu-gcc] core/snmp.o\n [thread 0][x86_64-linux-gnu-gcc] core/exceptions.o\n [thread 1][x86_64-linux-gnu-gcc] core/config.o\n [thread 0][x86_64-linux-gnu-gcc] core/setup_utils.o\n [thread 1][x86_64-linux-gnu-gcc] core/clock.o\n [thread 0][x86_64-linux-gnu-gcc] core/init.o\n [thread 1][x86_64-linux-gnu-gcc] core/buffer.o\n [thread 0][x86_64-linux-gnu-gcc] core/reader.o\n [thread 1][x86_64-linux-gnu-gcc] core/writer.o\n [thread 0][x86_64-linux-gnu-gcc] core/alarm.o\n [thread 1][x86_64-linux-gnu-gcc] core/cron.o\n [thread 0][x86_64-linux-gnu-gcc] core/hooks.o\n [thread 1][x86_64-linux-gnu-gcc] core/plugins.o\n [thread 0][x86_64-linux-gnu-gcc] core/lock.o\n [thread 1][x86_64-linux-gnu-gcc] core/cache.o\n core/lock.c: In function \xe2\x80\x98uwsgi_lock_fast_init\xe2\x80\x99:\n core/lock.c:114:17: warning: \xe2\x80\x98pthread_mutexattr_setrobust_np\xe2\x80\x99 is deprecated: pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust [-Wdeprecated-declarations]\n 114 | if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {\n | ^~\n In file included from /usr/include/features.h:486,\n from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,\n from /usr/include/stdio.h:27,\n from ./uwsgi.h:165,\n from core/lock.c:1:\n /usr/include/pthread.h:951:12: note: declared here\n 951 | extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,\n | ^~~~~~~~~~~~~~\n core/lock.c: In function \xe2\x80\x98uwsgi_lock_fast\xe2\x80\x99:\n core/lock.c:176:17: warning: \xe2\x80\x98pthread_mutex_consistent_np\xe2\x80\x99 is deprecated: pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent [-Wdeprecated-declarations]\n 176 | pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);\n | ^~~~~~~~~~~~~~~~~~~~~~~~\n In file included from /usr/include/features.h:486,\n from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,\n from /usr/include/stdio.h:27,\n from ./uwsgi.h:165,\n from core/lock.c:1:\n /usr/include/pthread.h:859:12: note: declared here\n 859 | extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),\n | ^~~~~~~~~~~~~~\n [thread 0][x86_64-linux-gnu-gcc] core/daemons.o\n [thread 0][x86_64-linux-gnu-gcc] core/errors.o\n [thread 1][x86_64-linux-gnu-gcc] core/hash.o\n [thread 0][x86_64-linux-gnu-gcc] core/master_events.o\n [thread 1][x86_64-linux-gnu-gcc] core/chunked.o\n [thread 0][x86_64-linux-gnu-gcc] core/queue.o\n [thread 1][x86_64-linux-gnu-gcc] core/event.o\n [thread 0][x86_64-linux-gnu-gcc] core/signal.o\n [thread 1][x86_64-linux-gnu-gcc] core/strings.o\n [thread 0][x86_64-linux-gnu-gcc] core/progress.o\n [thread 0][x86_64-linux-gnu-gcc] core/timebomb.o\n [thread 1][x86_64-linux-gnu-gcc] core/ini.o\n [thread 0][x86_64-linux-gnu-gcc] core/fsmon.o\n [thread 1][x86_64-linux-gnu-gcc] core/mount.o\n [thread 0][x86_64-linux-gnu-gcc] core/metrics.o\n [thread 1][x86_64-linux-gnu-gcc] core/plugins_builder.o\n core/metrics.c: In function \xe2\x80\x98uwsgi_metric_set_max\xe2\x80\x99:\n core/metrics.c:706:5: warning: this \xe2\x80\x98if\xe2\x80\x99 clause does not guard... [-Wmisleading-indentation]\n 706 | if (value > *um->value)\n | ^~\n In file included from core/metrics.c:1:\n ./uwsgi.h:436:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the \xe2\x80\x98if\xe2\x80\x99\n 436 | #define uwsgi_rwunlock(x) uwsgi.lock_ops.rwunlock(x)\n | ^~~~~\n core/metrics.c:708:9: note: in expansion of macro \xe2\x80\x98uwsgi_rwunlock\xe2\x80\x99\n 708 | uwsgi_rwunlock(uwsgi.metrics_lock);\n | ^~~~~~~~~~~~~~\n core/metrics.c: In function \xe2\x80\x98uwsgi_metric_set_min\xe2\x80\x99:\n core/metrics.c:714:5: warning: this \xe2\x80\x98if\xe2\x80\x99 clause does not guard... [-Wmisleading-indentation]\n 714 | if ((value > um->initial_value || 0) && value < *um->value)\n | ^~\n In file included from core/metrics.c:1:\n ./uwsgi.h:436:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the \xe2\x80\x98if\xe2\x80\x99\n 436 | #define uwsgi_rwunlock(x) uwsgi.lock_ops.rwunlock(x)\n | ^~~~~\n core/metrics.c:716:9: note: in expansion of macro \xe2\x80\x98uwsgi_rwunlock\xe2\x80\x99\n 716 | uwsgi_rwunlock(uwsgi.metrics_lock);\n | ^~~~~~~~~~~~~~\n [thread 1][x86_64-linux-gnu-gcc] core/sharedarea.o\n [thread 0][x86_64-linux-gnu-gcc] core/rpc.o\n [thread 1][x86_64-linux-gnu-gcc] core/gateway.o\n [thread 0][x86_64-linux-gnu-gcc] core/loop.o\n [thread 1][x86_64-linux-gnu-gcc] core/cookie.o\n [thread 0][x86_64-linux-gnu-gcc] core/querystring.o\n [thread 1][x86_64-linux-gnu-gcc] core/rb_timers.o\n [thread 0][x86_64-linux-gnu-gcc] core/transformations.o\n [thread 1][x86_64-linux-gnu-gcc] core/uwsgi.o\n [thread 0][x86_64-linux-gnu-gcc] proto/base.o\n [thread 0][x86_64-linux-gnu-gcc] proto/uwsgi.o\n [thread 0][x86_64-linux-gnu-gcc] proto/http.o\n [thread 0][x86_64-linux-gnu-gcc] proto/fastcgi.o\n [thread 0][x86_64-linux-gnu-gcc] proto/scgi.o\n [thread 1][x86_64-linux-gnu-gcc] proto/puwsgi.o\n [thread 0][x86_64-linux-gnu-gcc] lib/linux_ns.o\n [thread 1][x86_64-linux-gnu-gcc] core/zlib.o\n [thread 1][x86_64-linux-gnu-gcc] core/yaml.o\n [thread 0][x86_64-linux-gnu-gcc] core/ssl.o\n core/ssl.c: In function \xe2\x80\x98uwsgi_ssl_new_server_context\xe2\x80\x99:\n core/ssl.c:268:17: warning: \xe2\x80\x98PEM_read_bio_DHparams\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 268 | DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);\n | ^~\n In file included from /usr/include/openssl/ssl.h:36,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/pem.h:469:1: note: declared here\n 469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)\n | ^~~~~~~~~~~~~~~~~~~\n core/ssl.c:273:25: warning: \xe2\x80\x98DH_free\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 273 | DH_free(dh);\n | ^~~~~~~\n In file included from /usr/include/openssl/dsa.h:51,\n from /usr/include/openssl/x509.h:37,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/dh.h:200:28: note: declared here\n 200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);\n | ^~~~~~~\n core/ssl.c:279:9: warning: \xe2\x80\x98EC_KEY_new_by_curve_name\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 279 | EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);\n | ^~~~~~\n In file included from /usr/include/openssl/x509.h:33,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/ec.h:998:31: note: declared here\n 998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);\n | ^~~~~~~~~~~~~~~~~~~~~~~~\n core/ssl.c:283:17: warning: \xe2\x80\x98EC_KEY_free\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 283 | EC_KEY_free(ecdh);\n | ^~~~~~~~~~~\n In file included from /usr/include/openssl/x509.h:33,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/ec.h:1003:28: note: declared here\n 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);\n | ^~~~~~~~~~~\n core/ssl.c: In function \xe2\x80\x98uwsgi_sha1\xe2\x80\x99:\n core/ssl.c:563:9: warning: \xe2\x80\x98SHA1_Init\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 563 | SHA1_Init(&sha);\n | ^~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:49:27: note: declared here\n 49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);\n | ^~~~~~~~~\n core/ssl.c:564:9: warning: \xe2\x80\x98SHA1_Update\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 564 | SHA1_Update(&sha, src, len);\n | ^~~~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:50:27: note: declared here\n 50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);\n | ^~~~~~~~~~~\n core/ssl.c:565:9: warning: \xe2\x80\x98SHA1_Final\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 565 | SHA1_Final((unsigned char *)dst, &sha);\n | ^~~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:51:27: note: declared here\n 51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);\n | ^~~~~~~~~~\n core/ssl.c: In function \xe2\x80\x98uwsgi_md5\xe2\x80\x99:\n core/ssl.c:571:9: warning: \xe2\x80\x98MD5_Init\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 571 | MD5_Init(&md5);\n | ^~~~~~~~\n In file included from core/ssl.c:4:\n /usr/include/openssl/md5.h:49:27: note: declared here\n 49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);\n | ^~~~~~~~\n core/ssl.c:572:9: warning: \xe2\x80\x98MD5_Update\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 572 | MD5_Update(&md5, src, len);\n | ^~~~~~~~~~\n In file included from core/ssl.c:4:\n /usr/include/openssl/md5.h:50:27: note: declared here\n 50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);\n | ^~~~~~~~~~\n core/ssl.c:573:9: warning: \xe2\x80\x98MD5_Final\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 573 | MD5_Final((unsigned char *)dst, &md5);\n | ^~~~~~~~~\n In file included from core/ssl.c:4:\n /usr/include/openssl/md5.h:51:27: note: declared here\n 51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);\n | ^~~~~~~~~\n core/ssl.c: In function \xe2\x80\x98uwsgi_sha1_2n\xe2\x80\x99:\n core/ssl.c:579:9: warning: \xe2\x80\x98SHA1_Init\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 579 | SHA1_Init(&sha);\n | ^~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:49:27: note: declared here\n 49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);\n | ^~~~~~~~~\n core/ssl.c:580:9: warning: \xe2\x80\x98SHA1_Update\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 580 | SHA1_Update(&sha, s1, len1);\n | ^~~~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:50:27: note: declared here\n 50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);\n | ^~~~~~~~~~~\n core/ssl.c:581:9: warning: \xe2\x80\x98SHA1_Update\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 581 | SHA1_Update(&sha, s2, len2);\n | ^~~~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:50:27: note: declared here\n 50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);\n | ^~~~~~~~~~~\n core/ssl.c:582:9: warning: \xe2\x80\x98SHA1_Final\xe2\x80\x99 is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]\n 582 | SHA1_Final((unsigned char *)dst, &sha);\n | ^~~~~~~~~~\n In file included from /usr/include/openssl/x509.h:41,\n from /usr/include/openssl/ssl.h:31,\n from ./uwsgi.h:357,\n from core/ssl.c:1:\n /usr/include/openssl/sha.h:51:27: note: declared here\n 51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);\n | ^~~~~~~~~~\n [thread 1][x86_64-linux-gnu-gcc] core/legion.o\n [thread 0][x86_64-linux-gnu-gcc] core/xmlconf.o\n [thread 0][x86_64-linux-gnu-gcc] core/dot_h.o\n [end of output]\n \n note: This error originates from a subprocess, and is likely not a problem with pip.\nerror: legacy-install-failure\n\n\xc3\x97 Encountered error while trying to install package.\n\xe2\x95\xb0\xe2\x94\x80> uwsgi\n\nnote: This is an issue with the package mentioned above, not pip.\nhint: See above for output from the failure.\nRun Code Online (Sandbox Code Playgroud)\n
小智 5
它说:“对 uwsgi 使用旧版‘setup.py install’,因为未安装包‘wheel’。” 所以你可以尝试安装wheel:
pip install wheel
Run Code Online (Sandbox Code Playgroud)
或者你可以使用 apt 安装 uwsgi:
apt-get install uwsgi
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3885 次 |
| 最近记录: |