【问题标题】:can't install Gdal on centos7centos7无法安装Gdal
【发布时间】:2017-03-22 15:19:25
【问题描述】:

大家好,感谢您的帮助。

我的问题是我正在尝试在 CENTOS7 上安装 GDAL,使用 yum 我实现了它,但在 pyhton2.7 上无法识别它。

使用 yum,它从 EPEL repo 安装 1.11.4-1.el7 版本 但是当使用 PIP LIST 时,不会显示为已安装。

当尝试使用 pip 再次执行此操作时,会显示此错误:

extensions/gdal_wrap.cpp:3085:22: error fatal: cpl_port.h: No existe el      fichero o el directorio
(is is spanish: "directory doesn't exit")
#include "cpl_port.h"
                    ^
compilación terminada.
error: command 'gcc' failed with exit status 1

 ----------------------------------------
 Failed building wheel for gdal

我认为 pip 正在尝试安装最新版本,但 Centos 只接受最高 v1.11.4

请帮我正确安装U_U

【问题讨论】:

    标签: python-2.7 centos7 yum gdal


    【解决方案1】:

    gdal 库文件在/usr/include/gdal 路径下,因此需要将它们添加到路径中。 请试试 echo $'export CPLUS_INCLUDE_PATH=/usr/include/gdal\nexport \ C_INCLUDE_PATH=$CPLUS_INCLUDE_PATH' >> /etc/profile source /etc/profile ...

    【讨论】:

      猜你喜欢
      • 2020-12-11
      • 2019-01-24
      • 2021-02-28
      • 1970-01-01
      • 2022-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-21
      相关资源
      最近更新 更多