1

我正在尝试readxl在 Windows 64 位机器上安装新软件包。我尝试了以下命令进行安装

install.packages("devtools")
library(devtools)
install.packages("Rcpp")  
library(Rcpp)
install_github("hadley/readxl")

我收到以下install_github命令错误:

Installing github repo readxl/master from hadley
Downloading master.zip from https://github.com/hadley/readxl/archive/master.zip
Installing package from C:\Users\RAVISH~1.R\AppData\Local\Temp\RtmpUTzCUH/master.zip
Installing readxl
"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" --vanilla CMD INSTALL  \
"C:\Users\ravishankar.r\AppData\Local\Temp\RtmpUTzCUH\devtools585870ed251a\readxl-master"  \
  --library="C:/Users/ravishankar.r/Documents/R-dev" --install-tests 

* installing *source* package 'readxl' ...
** libs

*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="readxl.dll" OBJECTS="RcppExports.o XlsWorkBook.o XlsWorkSheet.o XlsxWorkBook.o XlsxWorkSheet.o benchmarks.o endian.o ole.o xls.o xlstool.o zip.o"' had status 127
ERROR: compilation failed for package 'readxl'
* removing 'C:/Users/ravishankar.r/Documents/R-dev/readxl'
Error: Command failed (1)

有人可以帮我解决这个错误吗?

4

1 回答 1

2

安装正确版本的 Rtools 解决了这个问题。对于 R 3.1.2,我必须安装 Rtools 3.1。

于 2015-04-13T08:11:08.223 回答