错误:无法找到构建所需的构建工具 [英] Error : Could not find build tools necessary to build

查看:160
本文介绍了错误:无法找到构建所需的构建工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I installed Xcode on my Mac, running on the El Capitan version 10.11. I need to get files from a github repository to my workspace in R, so I run the line:

devtools::install_github("Myrepository")

此错误出现:

And this error appears:

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命令行工具,但是当我打了

I thought the problem may come from my gcc command line tools, but when I hit

gcc -v

我安装了它:

I have it installed:

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

任何想法?

推荐答案

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

I had the same problem when installing the forecast package from GitHub on my Mac running El Capitan. The suggested readline fix above did not work for me. I noticed that my shell wasn't seeing R (e.g. when I typed R at a shell prompt it said command not found). I also was operating as a non-admin user of my computer and I think had installed R as a non-admin user. So I downloaded R again (same version) and installed it as an admin user. (This was based on a hunch after reading about some of the finnicky issues with R and paths in El Cap) After reinstalling R as an admin user I could then open R in a terminal, and at that point devtools::install_github("robjhyndman/forecast") worked fine.

这篇关于错误:无法找到构建所需的构建工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆