web-dev-qa-db-ja.com

Postgres11をElastic Beanstalkにデプロイする-/ etc / redhat-releaseが必要

最初のアプリをElastic Beanstalkにデプロイするのはすごく時間がかかります。 Postgres11はRDSで正式にサポートされていますが、インストールできません。

[〜#〜] issue [〜#〜]
実行した場合eb deploypg_config実行ファイルが見つかりません。ビルドする必要がありますpsycopg2ソースから。

/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: ...

リポジトリを追加する必要があると思いますか?けっこうだ。次に、インターネット上の他の投稿で見つけたように、リポジトリを追加してみます。

[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

ここからstuckシンボリックリンクを試しました/etc/system-release -> /etc/redhat-release運が悪い。他に誰もこの問題を抱えているようではありませんか?私も切望されていないようですAmazon-linux-extras 何らかの理由で?

環境

環境層: Webサーバー
プラットフォーム: Python 3.6 64ビット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
5
Scott

PostgreSQL 11はまだAmazonから入手できませんが、PostgreSQL 10は入手可能です。 cat /etc/system-releaseから報告されたAmazon Linuxリリース2(Karoo)を使用しています。インストールを有効にするには:

$ Sudo Amazon-linux-extras enable postgresql10

この追加を有効にすると、yumから利用可能なPostgreSQL 10の多くのパッケージが表示されます。これらのパッケージは通常どおりインストールできます。

$ yum list postgresql*
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
postgresql.x86_64                    10.4-5.amzn2.0.2    @amzn2extra-postgresql10
postgresql-devel.x86_64              10.4-5.amzn2.0.2    @amzn2extra-postgresql10
postgresql-libs.x86_64               10.4-5.amzn2.0.2    @amzn2extra-postgresql10
Available Packages
postgresql-contrib.x86_64            10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-docs.x86_64               10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-libs.i686                 10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-plperl.x86_64             10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-plpython.x86_64           10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-plpython3.x86_64          10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-pltcl.x86_64              10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-server.x86_64             10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-static.x86_64             10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-test.x86_64               10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-test-rpm-macros.x86_64    10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-upgrade.x86_64            10.4-5.amzn2.0.2    amzn2extra-postgresql10
postgresql-upgrade-devel.x86_64      10.4-5.amzn2.0.2    amzn2extra-postgresql10
2
liquidki

または、ソースからpostgresqlを構築することもできます。

wget https://ftp.postgresql.org/pub/source/v11.5/postgresql-11.5.tar.gz

tar zxvf postgresql-11.5.tar.gz

cd postgresql-11.5

./configure --without-readline

make

make install

1
citymonkeymao