我试图通过AWS EB实现我的Django应用程序但是当我按照教程http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html上显示的步骤进行操作时,它会一直给我一个错误,说明"您的要求.txt无效。"我想我在尝试安装GDAL 2.1.0时遇到错误我在requirements.txt
这是我的一些配置文件:
project.config
var auth = new OAuth2Authenticator(
clientId: "***************************.apps.googleusercontent.com",
scope: "https://www.googleapis.com/auth/userinfo.profile",
authorizeUrl: new Uri("https://accounts.google.com/o/oauth2/auth"),
redirectUrl: new Uri("https://www.googleapis.com/plus/v1/people/me"),
accessTokenUrl: newUri("https://www.googleapis.com/oauth2/v4/token"),
clientSecret: "*********************",
getUsernameAsync: null);
auth.Completed += async (sender, e) =>
{
if (!e.IsAuthenticated)
{
Toast.MakeText(this, "Fail to authenticate!", ToastLength.Short).Show();
return;
}
string access_token;
e.Account.Properties.TryGetValue("access_token", out access_token);
}
packages.config
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "hungryboat.settings"
PYTHONPATH: "/opt/python/current/app/src:$PYTHONPATH"
"aws:elasticbeanstalk:container:python":
WSGIPath: "hungryboat/wsgi.py"
command:
01_pip_update:
command:"pip install --upgrade pip"
并收到错误消息/日志:
packages:
yum:
git: []
libtiff-devel: []
libjpeg-turbo-devel: []
libzip-devel: []
freetype-devel: []
postgresql95-devel: []
geos: []
libmemcached: []
libmemcached-devel: []
cyrus-sasl-devel: []
zlib-devel: []
command:
01_gdal:
command:"yum --enablerepo=epel -y install gdal"
欢迎任何关于如何解决这个问题的建议。
仅供参考:我已经尝试过radtek在这篇帖子上的回答 - Configuring Amazon Elastic Beanstalk with PostGIS没有运气。也试过别人类似他的回答。
谢谢。
答案 0 :(得分:3)
可能是因为缺少开发包。所以你可以尝试安装' gdal-dev'像这样
yum --enablerepo=epel -y install gdal gdal-devel
答案 1 :(得分:0)
我通过在package.config文件上创建一个巨大的命令来解决问题
我添加了这一行:
<li ng-repeat="batch in vm.batches track by $index">
<div ng-show="batch.opened.submitted">
<table datatable="ng" class="table table-condensed dataTable" dt-options="vm.dtOptions" dt-instance="$index">
从那以后pip install GDAL完美运行。希望如果有人卡住,这会有所帮助。免责声明:使用不同环境/设置等的人可能会有所不同。