0

I have been working through the installation of GeoDjango and I have run into problems when installing the GDAL library. I'm running ubuntu 16.04 and I have installed GEOS and PROJ.4, I'm working with a PostGIS installation. I previously had a version of python 3.5 installed and went through uninstalling it to see if that resolved the issue. On make i receive the following error:

/home/matt/geodjango/gdal-1.11.2/.libs/libgdal.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()'
/home/matt/geodjango/gdal-1.11.2/.libs/libgdal.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned long) const'
collect2: error: ld returned 1 exit status
GNUmakefile:46: recipe for target 'gdalinfo' failed
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory '/home/matt/geodjango/gdal-1.11.2/apps'
GNUmakefile:69: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2

I found Converting std::__cxx11::string to std::string but I'm not sure how to implement this solution. Are there other suggestions to successfully install GDAL?

Community
  • 1
  • 1
ArcticCzar
  • 41
  • 2

2 Answers2

1

I tried:

pip install gdal

which failed with:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-yOu25c/gdal/

and:

easy_install gdal

failed with:

setuptools.sandbox.UnpickleableException: gdal_config_error(OSError(2, 'No such file or directory'),)

I was able to run :

conda install gdal

which worked and returns true for:

>>> from django.contrib.gis import gdal
>>> gdal.HAS_GDAL
true
ArcticCzar
  • 41
  • 2
0

postgis and GDAL can be installed directly from ubuntu's repositories:

sudo apt-get install postgis
Udi
  • 29,222
  • 9
  • 96
  • 129