Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error : Could not find build tools necessary to build

Tags:

github

xcode

r

gcc

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

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

Any ideas?

like image 937
Helenatodd Avatar asked Mar 10 '16 10:03

Helenatodd


1 Answers

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.

like image 115
Nicholas G Reich Avatar answered Sep 20 '22 11:09

Nicholas G Reich