Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
378 views
in Technique[技术] by (71.8m points)

r - Error: Could not find build tools necessary to build dplyr

I'm trying to install dplyr from its repository, but I getting the following error. I'm using MBP with Yosemite and Xcode 6.2 (it's a bit outdate). I found this curious, apparently, it's not a common issue as I didn't find any thread on this error message. I'm wondering what is the build tools I'm lacking here.

> devtools::install_github("hadley/dplyr")
Downloading GitHub repo hadley/dplyr@master
from URL https://api.github.com/repos/hadley/dplyr/zipball/master
Error: Could not find build tools necessary to build dplyr

This is the error I'm receiving from terminal when I try to install a package from source locally:

clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -DPLATFORM_PKGTYPE='"mac.binary.mavericks"'    -fPIC  -Wall -mtune=core2 -g -O2  -c pause.c -o pause.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/X11/lib -L/usr/local/lib /usr/local/lib/libcairo.a /usr/local/lib/libpixman-1.a /usr/local/lib/libfreetype.a /usr/local/lib/libfontconfig.a -lxml2 /usr/local/lib/libreadline.a -o profvis.so pause.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
clang: error: no such file or directory: '/usr/local/lib/libreadline.a'
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can go to this address to download and install a newer version of Command Line Tools as well as XCode as mentioned by @alistaire, but the one you have is fine.

By the message you posted, it suggests a linkage problem. You want to create a symlink for the readline lib. Homebrew does this for us, but for some reason it didn't; so you may be able to solve this by creating the link manually with --force option as:

brew link readline --force


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...