Search code examples
djangoamazon-elastic-beanstalkgdalgeodjango

Beanstalk Migration Failing for Geodjango


I want to deploy geodjango in aws beanstalk.

I have already tried this solution. It worked before.

commands:
  01_yum_update:
    command: sudo yum -y update
  02_epel_repo:
    command: sudo yum-config-manager -y --enable epel
  03_install_gdal_packages:
    command: yum --enablerepo=epel -y install gdal gdal-devel

packages:
  yum:
    git: []
    postgresql96-devel: []
    gettext: []
    libjpeg-turbo-devel: []
    libffi-devel: []

But right now it's showing this error.

AttributeError: /usr/lib64/libgdal.so.1: undefined symbol: GDALGetMetadataDomainList
   (ElasticBeanstalk::ExternalInvocationError)

Here is the full error log


Solution

  • Looks like using Django==2.2.1 messing the things. The current requirements.txt which worked is as follows:

    Django==2.1.8
    django-cors-headers==2.5.2
    django-debug-toolbar==1.11
    django-extensions==2.1.6
    django-model-utils==3.1.2
    djangorestframework==3.9.2
    psycopg2-binary==2.8.2
    pytz==2019.1
    six==1.12.0
    sqlparse==0.3.0