错误:“找不到构建字符串所必需的构建工具”;尝试devtools :: install_github()时 [英] Error: "Could not find build tools necessary to build stringi" when trying devtools::install_github()
问题描述
尝试
devtools :: install_github( Rexamine / stringi)
并收到错误消息:
找不到构建stringi所需的构建工具
Trying devtools::install_github("Rexamine/stringi") and getting error: Could not find build tools necessary to build stringi
我看到几个人遇到了这个错误,但是解决方案对我没有用。我重新安装了xcode,因为命令行工具似乎是其他人的问题。检查R和RStudio的路径后,我都可以打开它(也可以从终端打开)。不要以为这是Rtools的问题,但我不知道问题出在哪里。有没有人碰到这个特殊的devtools错误?
I see several people have had this error but the solutions haven't worked for me. I reinstalled xcode because the command line tools seemed to be the problem for other people. Checked the paths for R and RStudio, I can open both fine (from the terminal as well). Don't think this is an Rtools issue but I can't figure out where the problem is. Has anyone had any luck with this particular devtools error?
正在运行OSX 10.11.6,RStudio版本0.99.896,R 3.2.1 GUI 1.66 Mavericks版本(6956), XCode版本7.3.1(7D1014)。
Running OSX 10.11.6, RStudio Version 0.99.896, R 3.2.1 GUI 1.66 Mavericks build (6956), XCode Version 7.3.1 (7D1014).
推荐答案
您可以尝试运行
/usr/bin/clang --version
如果安装了命令行工具,则应该只需报告安装的 clang
的版本;否则,系统会提示您安装Xcode +命令行工具。 (这是确保确实安装了命令行工具的一种简单方法)
If command line tools are installed, this should just report the version of clang
installed; otherwise, you'll be prompted to install Xcode + Command Line Tools. (This is just a simple way of ensuring command line tools indeed are installed)
如果您运行
devtools::install_github("Rexamine/stringi")
普通的R控制台,在RStudio之外,您看到了什么?您可以使用打印到控制台的错误(如果有)来更新您的帖子吗?
in a plain R console, outside of RStudio, what do you see? Can you update your post with the errors (if any) printed to the console?
您还可以尝试将RStudio更新为预览版本( https://www.rstudio.com/products/rstudio/download/preview/ )查看是否
You might also try updating RStudio to the preview release (https://www.rstudio.com/products/rstudio/download/preview/) to see if that helps.
似乎这可能是RStudio构建工具检测中的错误;您可以尝试使用以下命令显式禁用它:
It seems like this is likely a bug in RStudio's build tools detection; you might try explicitly disabling it with:
options(buildtools.check = function(action) TRUE)
这应该确保 devtools
不要尝试调用RStudio的构建工具检测代码,并假设一切都可用。
This should ensure that devtools
doesn't try to call RStudio's build tools detection code and just assume that everything is available.
这篇关于错误:“找不到构建字符串所必需的构建工具”;尝试devtools :: install_github()时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!