如何直接从github存储库安装正在开发的软件包,一旦安装,如何在开发和CRAN版本之间切换?
我有兴趣从git安装的特定包是ggplot2.
我正在尝试从其存储库安装dplyr,但是我收到以下错误.我正在使用MBP与Yosemite和Xcode 6.2(它有点过时).我发现这很好奇,显然,这不是一个常见问题,因为我没有在此错误消息上找到任何线程.我想知道我在这里缺少什么构建工具.
> 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
Run Code Online (Sandbox Code Playgroud)
当我尝试从本地安装源包时,这是我从终端收到的错误:
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'
Run Code Online (Sandbox Code Playgroud) 我在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)
有任何想法吗?