我一直在安装GeoDjango,在安装GDAL library时遇到了一些问题。我正在运行ubuntu 16.04,并且已经安装了GEOS和PROJ.4,我正在使用PostGIS安装。我之前安装了Python3.5的一个版本,并卸载了它,看看这是否解决了问题。在make时,我收到以下错误:
/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我找到了Converting std::__cxx11::string to std::string,但我不确定如何实现这个解决方案。要成功安装GDAL,还有其他建议吗?
发布于 2017-02-13 14:50:47
我试过了:
pip install gdal失败的原因是:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-yOu25c/gdal/和:
easy_install gdal失败,错误为:
setuptools.sandbox.UnpickleableException: gdal_config_error(OSError(2, 'No such file or directory'),)我能够运行:
conda install gdal它在以下情况下工作并返回true:
>>> from django.contrib.gis import gdal
>>> gdal.HAS_GDAL
true发布于 2017-02-14 03:37:17
postgis和GDAL可以直接从ubuntu的repositories安装
sudo apt-get install postgishttps://stackoverflow.com/questions/42196027
复制相似问题