无法使 Gdal 1.11.2 从二进制文件运行

Can't make Gdal 1.11.2 work from binaries

我正在尝试为 Django 项目安装 GEOS 并遵循 Docs but while compiling on Ubuntu 16.04 Xenial I get this error. There was some fix for it here 但它也没有用。根据官方 Django 文档,以下是我在 运行 "make" 时遇到的错误。

错误:

    gdalserver.c: In function 'CreateSocketAndBindAndListen':
gdalserver.c:125:21: error: storage size of 'sHints' isn't known
     struct addrinfo sHints;
                     ^
gdalserver.c:127:31: error: invalid application of 'sizeof' to incomplete type 'struct addrinfo'
     memset(&sHints, 0, sizeof(struct addrinfo));
                               ^
gdalserver.c:130:23: error: 'AI_PASSIVE' undeclared (first use in this function)
     sHints.ai_flags = AI_PASSIVE;
                       ^
gdalserver.c:130:23: note: each undeclared identifier is reported only once for each function it appears in
gdalserver.c:133:12: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
     nRet = getaddrinfo(NULL, pszService, &sHints, &psResults);
            ^
gdalserver.c:136:48: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration]
         fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
                                                ^
gdalserver.c:136:25: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat=]
         fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
                         ^
gdalserver.c:142:39: error: dereferencing pointer to incomplete type 'struct addrinfo'
          psResultsIter = psResultsIter->ai_next)
                                       ^
gdalserver.c:163:5: warning: implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration]
     freeaddrinfo(psResults);
     ^
gdalserver.c:125:21: warning: unused variable 'sHints' [-Wunused-variable]
     struct addrinfo sHints;
                     ^
../GDALmake.opt:565: recipe for target 'gdalserver.lo' failed
make[1]: *** [gdalserver.lo] Error 1
make[1]: Leaving directory '/home/osboxes/gdal-1.11.2/apps'
GNUmakefile:69: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2

试用 GDAL 2.2.2 版本。您正在尝试的版本未得到维护。也尝试升级您正在使用的所有软件版本。补丁和升级是有原因的,因此请始终保持更新版本。