【问题标题】:Update gdal on ubuntu 22.04在 ubuntu 22.04 上更新 gdal
【发布时间】:2022-11-19 00:10:20
【问题描述】:

我正在尝试在我的 Ubuntu 22.04 上更新 GDAL:

python3 -m pip install --upgrade GDAL

发生此错误:

extensions/gdal_array_wrap.cpp:3237:10: fatal error: ogr_recordbatch.h: Aucun fichier ou dossier de ce type
       3237 | #include "ogr_recordbatch.h"
            |          ^~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

“Aucun fichier ou dossier de ce type”是指在法语中找不到文件或文件夹。

OGR 已安装并且工作正常:

ogrinfo --version
GDAL 3.4.1, released 2021/12/27

我没主意了...

【问题讨论】:

  • 对于那些有同样问题的人,我的观点是将 webp 配置文件用于地图图块,这仅在上一个版本中可用。由于我找不到 gdal 更新的解决方案,我使用 php/shell 脚本将所有 png 文件转换为带有 cwebp lib cwebp -q 50 file.png -o file.webp 的 webp

标签: python gdal ubuntu-22.04 gdal2tiles.py


【解决方案1】:

ogr_recordbatch.h 是 GDAL 3.6.0 中的新包含文件之一 - https://github.com/OSGeo/gdal/blob/v3.6.0/NEWS.md

显然,您的系统从 Ubuntu 安装的 GDAL 是旧版本 - 3.4.1。

我不知道你想做什么。

如果您尝试仅更新 Python 模块,则需要有足够的系统安装 GDAL。这是行不通的。

如果您正在尝试更新系统安装的 GDAL - Ubuntu 没有当前的 GDAL PPA。

如果您需要当前版本,您有两个选择:

  • 获取官方 Docker 映像之一并在 Docker 中使用它
  • 卸载Ubuntu系统-安装GDAL,获取源码自行编译

【讨论】:

    猜你喜欢
    • 2022-11-10
    • 2022-08-14
    • 2022-06-14
    • 2023-02-14
    • 2017-07-23
    • 2022-07-06
    • 2022-10-19
    • 2022-08-08
    • 2022-11-09
    相关资源
    最近更新 更多