使用上一代 Amazon Linux,我需要做的就是在 .ebextensions 中添加以下内容以使用 PostgreSQL:
packages:
yum:
postgresql93-devel: []
Run Code Online (Sandbox Code Playgroud)
现在,当我使用以下平台在 EB 上部署时:Python 3.7 running on 64bit Amazon Linux 2/3.0.0
我在部署时收到以下错误:
[ERROR] Error occurred during build: Yum does not have postgresql93-devel available for installation
Run Code Online (Sandbox Code Playgroud)
因此无法部署,因为我需要连接到 RDS 中的 PostgreSQL 数据库。
我需要在 .ebextensions 中做什么配置?
linux postgresql yum amazon-web-services amazon-elastic-beanstalk
我有一个在 Elastic Beanstalk 上使用 PostgreSQL 的 Django 项目。我在部署时发现了下一个错误:
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:
python setup.py build_ext --pg-config /path/to/pg_config build ...
Run Code Online (Sandbox Code Playgroud)
我在弹性 beantalk 上关注了psycopg2 - 无法部署应用程序来解决它并且它起作用了!但是过了一会儿,亚马逊似乎更新了我的虚拟环境,错误又回来了,所以我必须回去一遍又一遍地做同样的事情。
我也尝试过直接从 Elastic Beanstalk 面板配置数据库实例,但没有任何变化。
数据库在 RDS 上,我认为重要的是要说,当我在我的实例上手动安装 psycopg2 并重新部署一切正常时,我什至在此之后进行了几次部署,问题不存在,但经过一段时间后尽管。
我真的很想知道如何一劳永逸地解决它。提前致谢。
django postgresql amazon-ec2 amazon-web-services amazon-elastic-beanstalk