错误:无法找到构建所需的构建工具

Hel*_*odd 5 xcode gcc r github

我在Mac上安装了Xcode,在El Capitan版本10.11上运行.我需要从github存储库中获取文件到R中的工作区,所以我运行该行:

devtools::install_github("Myrepository")
Run Code Online (Sandbox Code Playgroud)

并出现此错误:

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
Run Code Online (Sandbox Code Playgroud)

我认为问题可能来自我的gcc命令行工具,但是当我点击时

gcc -v
Run Code Online (Sandbox Code Playgroud)

我安装了它:

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
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

Nic*_*ich 2

forecast在运行 El Capitan 的 Mac 上从 GitHub安装软件包时,我遇到了同样的问题。上面建议的 readline 修复对我不起作用。我注意到我的 shell 没有看到 R(例如,当我R在 shell 提示符下键入时,它说命令未找到)。我也以非管理员用户的身份操作我的计算机,并且我认为已经以非管理员用户的身份安装了 R。所以我再次下载了R(相同版本)并以管理员用户身份安装。(这是基于阅读了El Cap 中 R 和路径的一些棘手问题后的预感)以管理员用户身份重新安装 R 后,我可以在终端中打开 R,此时 devtools::install_github("robjhyndman/forecast") 工作正常。