I'm having a hell of a time deploying my first app to Elastic Beanstalk and could really use some help. I cannot get Postgres11 to install though it is officially supported with RDS.
ISSUE
If I run eb deploy
I get the message saying pg_config
executable not found. It is required to build psycopg2
from source.
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option: ...
I suppose I'll need to add the repo? Fair enough. Next I try adding the repo as I have found in other posts across the internet:
[ec2-user@ip-... etc]$ sudo yum -y install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
Loaded plugins: priorities, update-motd, upgrade-helper
pgdg-centos11-11-2.noarch.rpm | 5.6 kB 00:00:00
Examining /var/tmp/yum-root-cQJP_4/pgdg-centos11-11-2.noarch.rpm: pgdg-redhat-repo-42.0-4.noarch
Marking /var/tmp/yum-root-cQJP_4/pgdg-centos11-11-2.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pgdg-redhat-repo.noarch 0:42.0-4 will be installed
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-4.noarch
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-4.noarch
--> Finished Dependency Resolution
Error: Package: pgdg-redhat-repo-42.0-4.noarch (/pgdg-centos11-11-2.noarch)
Requires: /etc/redhat-release
From here I'm stuck. I've tried symlinking /etc/system-release -> /etc/redhat-release
with no luck. Nobody else seems to have this problem? I also don't seem to have the coveted amazon-linux-extras
for some reason?
Environment
Environment tier: Web Server
Platform: Python 3.6 running on 64bit Amazon Linux/2.8.2
.ebextensions/packages.config
packages:
yum:
postgresql11-devel: []
requirements.txt
Django==2.2
psycopg2==2.8.2
pytz==2019.1
sqlparse==0.3.0
[ec2-user@ip-... etc]$ cat /etc/os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
[ec2-user@ip-... etc]$ cat /etc/system-release
Amazon Linux AMI release 2018.03
os-release
specified thatID_LIKE="rhel fedora"
. I tried using the fedora rpm and the same result happend ->Requires: /etc/fedora-release
– Scott