Я ввожу git push heroku master
в командную строку, и некоторое время все идет хорошо, затем ...
WARNING: The Python installation you are using does not appear to have
been installed with a shared library, or in the case of MacOS X, as a
framework. Where these are not present, the compilation of mod_wsgi may
fail, or if it does succeed, will result in extra memory being used by
all processes at run time as a result of the static library needing to
be loaded in its entirety to every process. It is highly recommended
that you reinstall the Python installation being used from source code,
supplying the '--enable-shared' option to the 'configure' script when
configuring the source code prior to building and installing it.
затем ...
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/mod_wsgi.c -o build/temp.linux-x86_64-3.7/src/server/mod_wsgi.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
src/server/mod_wsgi.c: In function ‘wsgi_socket_sendv’:
src/server/mod_wsgi.c:10966:44: warning: signed and unsigned type in conditional expression [-Wsign-compare]
(nvec < iov_max ? nvec : (int)iov_max));
^
src/server/mod_wsgi.c: In function ‘wsgi_scan_headers’:
src/server/mod_wsgi.c:11125:30: warning: signed and unsigned type in conditional expression [-Wsign-compare]
buflen = buffer ? buflen : sizeof(x);
^
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_memory.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_memory.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_daemon.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_daemon.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_server.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_server.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_metrics.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_metrics.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_stream.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_stream.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_convert.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_convert.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_restrict.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_restrict.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_apache.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_apache.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_buckets.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_buckets.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_logger.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_logger.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_validate.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_validate.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_thread.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_thread.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I/app/.heroku/python/include/python3.7m -c src/server/wsgi_interp.c -o build/temp.linux-x86_64-3.7/src/server/wsgi_interp.o -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apache/include -I. -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr/include/apr-1 -I/tmp/pip-build-oxraezk2/mod-wsgi/src/packages/apr-util/include/apr-1 -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread
gcc -pthread -shared build/temp.linux-x86_64-3.7/src/server/mod_wsgi.o build/temp.linux-x86_64-3.7/src/server/wsgi_memory.o build/temp.linux-x86_64-3.7/src/server/wsgi_daemon.o build/temp.linux-x86_64-3.7/src/server/wsgi_server.o build/temp.linux-x86_64-3.7/src/server/wsgi_metrics.o build/temp.linux-x86_64-3.7/src/server/wsgi_stream.o build/temp.linux-x86_64-3.7/src/server/wsgi_convert.o build/temp.linux-x86_64-3.7/src/server/wsgi_restrict.o build/temp.linux-x86_64-3.7/src/server/wsgi_apache.o build/temp.linux-x86_64-3.7/src/server/wsgi_buckets.o build/temp.linux-x86_64-3.7/src/server/wsgi_logger.o build/temp.linux-x86_64-3.7/src/server/wsgi_validate.o build/temp.linux-x86_64-3.7/src/server/wsgi_thread.o build/temp.linux-x86_64-3.7/src/server/wsgi_interp.o -o build/lib.linux-x86_64-3.7/mod_wsgi/server/mod_wsgi-py37.cpython-37m-x86_64-linux-gnu.so -L/app/.heroku/python/lib -L/app/.heroku/python/lib/python3.7/config-3.7m-linux -lpython3.7m
/usr/bin/ld: /app/.heroku/python/lib/libpython3.7m.a(ceval.o): relocation R_X86_64_PC32 against symbol `_PyRuntime' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-oxraezk2/mod-wsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-yla81xqj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-oxraezk2/mod-wsgi/
! Push rejected, failed to compile Python app.
! Push failed
Я пытался pip install gcc
безрезультатно, и я даже не знаю, является ли gcc настоящей проблемой. Я пытаюсь научиться использовать Heroku и Python, надеясь позже развернуть приложение django (которое я уже создал) через Heroku.