Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
papayashake60 opened this issue Apr 5, 2022 · 2 comments
Closed
Assignees

Comments

@papayashake60
Copy link

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

@mgogoulos
Copy link
Contributor

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!

@papayashake60
Copy link
Author

papayashake60 commented Apr 7, 2022 via email

@mediacms-io mediacms-io locked and limited conversation to collaborators Nov 29, 2022
@mgogoulos mgogoulos converted this issue into discussion #592 Nov 29, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants