0

我正在尝试更新 R 中的包 sf() 。每次尝试执行此操作时都会出现以下错误,有任何关于如何解决此问题的见解吗?:

安装包(“sf”)

有可用的二进制版本,但源版本更高: binary source needs_compilation sf 0.5-5 0.6-0 TRUE

你想从源代码安装需要编译的包吗?y/n: y 安装源包'sf'</p>

尝试 URL ' https://cran.rstudio.com/src/contrib/sf_0.6-0.tar.gz '

内容类型 'application/x-gzip' 长度 7399611 字节 (7.1 MB)

已下载 7.1 MB

  • 安装无效的活动开发者路径 (/Library/Developer/CommandLineTools),缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun xcrun:错误:无效的活动开发者路径 (/Library/Developer/CommandLineTools),缺少 xcrun: /Library/Developer/CommandLineTools/usr/bin/xcrun xcrun:错误:无效的活动开发者路径(/Library/Developer/CommandLineTools),缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun 配置:CC:配置: CXX: 检查 gdal-config... no no configure: error: gdal-config not found or not executable. 错误:包“sf”的配置失败</li> /Library/Developer/CommandLineTools/usr/bin/xcrun xcrun:错误:无效的活动开发者路径(/Library/Developer/CommandLineTools),缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun 配置:CC:配置: CXX: 检查 gdal-config... no no configure: error: gdal-config not found or not executable. 错误:包“sf”的配置失败</li> /Library/Developer/CommandLineTools/usr/bin/xcrun xcrun:错误:无效的活动开发者路径(/Library/Developer/CommandLineTools),缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun 配置:CC:配置: CXX: 检查 gdal-config... no no configure: error: gdal-config not found or not executable. 错误:包“sf”的配置失败</li>
  • 删除 '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/sf'</li>
  • 恢复以前的 '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/sf' install.packages 中的警告:安装包 'sf' 的退出状态非零

下载的源码包在'/private/var/folders/t8/3gj53jlj2pn4sl9h2xrh8vmw0000gn/T/RtmpnFWJIZ/downloaded_pa​​ckages'</p>

4

1 回答 1

0

正如您在此处看到的:https : //cran.r-project.org/web/packages/sf/index.html sf 0.6-0 的 OSX Mavericks 二进制文件不能作为 CRAN 的二进制包提供。

于 2018-03-07T20:41:25.067 回答