我想通过aws EB部署django Web服务器。但是当我按eb deploy
刷新eb时,它不起作用。错误地,在EB中设置的postresql部分是错误的(据我猜测),因此我捕获了该部分:
2020/05/24 12:29:49.626792 [ERROR] Error occurred during build: Yum does not have postgresql96-devel available for installation
2020/05/24 12:29:49.626815 [ERROR] An error occurred during execution of command [app-deploy] - [PreBuildEbExtension]. Stop running the command. Error: EbExtension build failed. Please refer to /var/log/cfn-init.log for more details.
2020/05/24 12:29:49.626820 [INFO] Executing cleanup logic
我不知道我的问题。这是我的package.config
:
packages:
yum:
postgresql96-devel: []
gettext-devel: []
实际上,假设没有Amazon Linux 2(AL2),就没有postgresql96-devel
。
在AL2中,只有postgresql-devel
(9.2)。但是,如果9.2不适合,则可以使用amazon-linux-extras
amazon-linux-extras install postgresql9.6
要以自动方式在EB中执行该命令,您可以在Commands的.ebextensions
部分中运行它:
这些命令会在设置应用程序和Web服务器并提取应用程序版本文件之前运行。