【发布时间】:2016-03-10 10:50:21
【问题描述】:
我在 Mac 上安装了 Xcode,在 El Capitan 版本 10.11 上运行。我需要从 github 存储库获取文件到我在 R 中的工作区,所以我运行以下行:
devtools::install_github("Myrepository")
并且出现这个错误:
Downloading GitHub repo Myrepository
from URL https://api.github.com/repos/Myrepository/func/zipball/master
Erreur : Could not find build tools necessary to build func
我认为问题可能来自我的 gcc 命令行工具,但是当我点击
gcc -v
我已经安装好了:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
有什么想法吗?
【问题讨论】:
-
你安装xcode命令行工具了吗
-
是的,我做了,来自这个网站:developer.apple.com/downloads
-
devtools::has_devel()为您返回 TRUE,但对于使用用户名的devtools::install_github("username/Myrepository")不起作用? -
没错。但在“TRUE”消息之前,当我运行 devtools::has_devel() '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ - -no-save --no-restore CMD \ SHLIB foo.c
-
我收到了类似的消息(但我使用的是 Windows),有没有运气找到修复程序? "C:/PROGRA~1/R/R-32~1.5/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet \ CMD SHLIB foo.c