我有一个地狱的时间部署我的第一个应用程序的弹性豆茎,并可能真的需要一些帮助。我无法让Postgres11安装,尽管它是官方支持的RDS。
问题
如果我运行eb deploy,就会收到消息说pg_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?
环境
环境层:网络服务器
平台:运行在64位Amazon /2.8.2上的Python3.6
.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发布于 2019-04-23 11:10:27
对于AWSElasticBean秸秆上的Django 2.1项目,我的PostgreSQL 10也有同样的问题。
这个问题是上周在2019年4月17日左右推出的,目的是确保操作系统是一个真正的Red版本( Amazon不是)。我在PostgreSQL邮件列表中找到了一些细节:
“实际上,Amazon支持在几年前就被删除了。我只是确保我们的回购文件反映了这一点。” (https://www.postgresql.org/message-id/flat/15768-35c3af8405f5e346%40postgresql.org)
邮寄名单上的一张海报提出了以下解决办法:
“我们已经使用rpm暂时缓解了的问题,并显式地忽略了存储库依赖项,但对于真正的问题来说,这似乎是一个带辅助修复,即依赖关系不应该存在。”
就我个人而言,斯科特,我和您一样,只是简单地返回到AWS直接提供的PostgreSQL 9.6客户端包。只要Django和psycopg支持该版本,这个版本就能正常工作。
然而,长期的解决办法是让AWS最终提供带有Amazon 2的平台.
发布于 2019-09-10 13:40:41
或者,您可以从源构建posgresql:
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
发布于 2019-05-06 21:11:21
PostgreSQL 11还不能从亚马逊获得,但PostgreSQL 10是。我正在使用cat /etc/system-release报告的Amazon第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-postgresql10https://stackoverflow.com/questions/55798856
复制相似问题