mediacms icon indicating copy to clipboard operation
mediacms copied to clipboard

MediaCms on Samsung Galaxy S10 via Termux and Ubuntu 18 (core)

Open papayashake60 opened this issue 3 years ago • 2 comments

Psycopg2 Error

Error transcript here:

Installing collected packages: psycopg2-binary, uwsgi, async-timeout, wrapt, deprecated, redis, django-redis, billiard, vine, amqp, kombu, celery, MarkupSafe, jinja2, coreschema, uritemplate, inflection, ruamel.yaml.clib, ruamel.yaml, itypes, coreapi, drf-yasg, Pillow, pilkit, django-appconf, django-imagekit, zipp, importlib-metadata, markdown, django-filter, filetype, django-js-asset, django-mptt, django-crispy-forms, django-celery-email, iso8601, m3u8, django-ckeditor, django-debug-toolbar, django-login-required-middleware Running setup.py install for psycopg2-binary ... error ERROR: Command errored out with exit status 1: command: /home/mediacms.io/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-49w_nfkk/psycopg2-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-49w_nfkk/psycopg2-binary/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-record-pco407vv/install-record.txt --single-version-externally-managed --compile --install-headers /home/mediacms.io/include/site/python3.8/psycopg2-binary cwd: /tmp/pip-install-49w_nfkk/psycopg2-binary/ Complete output (40 lines): running install running build running build_py creating build creating build/lib.linux-aarch64-3.8 creating build/lib.linux-aarch64-3.8/psycopg2 copying lib/errors.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/_json.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/errorcodes.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/compat.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/pool.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/extensions.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/_lru_cache.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/tz.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/extras.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/_range.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/sql.py -> build/lib.linux-aarch64-3.8/psycopg2 copying lib/init.py -> build/lib.linux-aarch64-3.8/psycopg2 running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-aarch64-3.8 creating build/temp.linux-aarch64-3.8/psycopg aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.6 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120002 -DHAVE_LO64=1 -I/home/mediacms.io/include -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/12/server -c psycopg/psycopgmodule.c -o build/temp.linux-aarch64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement In file included from psycopg/psycopgmodule.c:28: ./psycopg/psycopg.h:36:10: fatal error: libpq-fe.h: No such file or directory 36 | #include <libpq-fe.h> | ^~~~~~~~~~~~ compilation terminated.

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).

error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /home/mediacms.io/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-49w_nfkk/psycopg2-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-49w_nfkk/psycopg2-binary/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-record-pco407vv/install-record.txt --single-version-externally-managed --compile --install-headers /home/mediacms.io/include/site/python3.8/psycopg2-binary Check the logs for full command output. mkdir: cannot create directory ‘logs’: File exists

Used Termux and Ubuntu 18.

Followed your single server admin code...

But did not succeed...

Any tips on how to proceed would be most welcome. Thank you very much

papayashake60 avatar Apr 05 '22 05:04 papayashake60

From what I can see it fails during the installation of python requirements, and for psycopg2-binary , with a quick search, I see https://stackoverflow.com/questions/58961043/how-to-install-libpq-fe-h could help but would require testing to see whether this solves the error or not! That's an interesting environment btw you are trying to get the software running!

mgogoulos avatar Apr 06 '22 10:04 mgogoulos

Hello Markos

Thanks for the quick reply...

I will investigate the python issue and hope to learn how to handle it. I am not really a programmer... just a "tinkerer".

More power to your projects..

Al

On Wed, Apr 6, 2022, 6:34 PM Markos Gogoulos, @.***> wrote:

From what I can see it fails during the installation of python requirements, and for psycopg2-binary , with a quick search, I see https://stackoverflow.com/questions/58961043/how-to-install-libpq-fe-h could help but would require testing to see whether this solves the error or not! That's an interesting environment btw you are trying to get the software running!

— Reply to this email directly, view it on GitHub https://github.com/mediacms-io/mediacms/issues/441#issuecomment-1090114582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5IOAYDXKKXPD5ISAFITRLVDVSEJANCNFSM5SRSJUMQ . You are receiving this because you authored the thread.Message ID: @.***>

papayashake60 avatar Apr 07 '22 00:04 papayashake60