【问题标题】:Error install gdal using macports on mac在 mac 上使用 macports 安装 gdal 时出错
【发布时间】:2016-03-17 21:08:27
【问题描述】:

我正在运行 Mac 10.7.5 并想使用 macports 安装 GDAL。我这样做:

sudo port install gdal

但我收到此错误:

--->  Computing dependencies for gdal
--->  Building gdal
Error: org.macports.build for port gdal returned: command execution failed
Please see the log file for port gdal for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port gdal failed

main.log文件中错误的最后一部分是:

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/work/gdal-2.0.2" && /usr/bin/make -j24 -w 
:info:build Exit code: 2
:error:build org.macports.build for port gdal returned: command execution failed
:debug:build Error code: CHILDSTATUS 78620 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for gdal: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port gdal for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/main.log

如何解决这个问题?

【问题讨论】:

  • 不想使用自制软件,因为不建议与 macports 共同安装
  • 如果您在 Internet 上进行任何操作或在 Mac 上使用公共 Wi-Fi 网络,您将面临严重的风险。 10.7.5 实际上已经死了。有没有办法接近受支持的安装?
  • 感谢@hrbrmstr,如果没有它无法完成这项工作,我可以考虑更新到更新的 mac 版本。但是,此 mac 充当内部集群,不确定更新它是否会影响所有人。
  • 您是否查看过 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/main.log 以了解更多详细信息,如错误消息中所述?
  • 谢谢@mico,我有。我的问题中的错误消息来自那个 main.log 文件

标签: macos macports gdal


【解决方案1】:

确保您已安装 Xcode 和 Xcode 命令行工具;否则port 将无法安装任何东西,你会得到这样的错误。 Xcode 命令行工具提供了被 MacPorts 调用的/usr/bin/make 应用程序


如果在验证您已安装 Xcode 和 Xcode 命令行工具后它仍然无法工作,那么这可能是由于 10.7.5 已经死了然后死了,而不仅仅是 Apple 不再支持该操作系统大多数其他软件供应商也不支持

很抱歉打扰您,但可能是时候升级了。不过好消息,它可能免费

【讨论】:

    【解决方案2】:

    您可以将 Homebrew 与 MacPorts 一起安装,这就是我会做的,因为您所说的很少。如果您对在每个数据包管理器中安装的内容不小心,您可能会遇到问题,但如果您无法解决您报告的问题,那么您无论如何都没有更多选择。

    无论如何,您的问题可能是您没有/usr/bin/make。 尝试在终端输入“/usr/bin/make”并报告你得到了什么。

    【讨论】:

      猜你喜欢
      • 2023-03-11
      • 2018-03-01
      • 2016-10-15
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-14
      • 2015-04-03
      相关资源
      最近更新 更多