2

I try to install an R package multidplyr (which is currently not available from CRAN) from github. I followed this link.

I first install.packages("devtools"), then library(devtools), then devtools::install_github("hadley/multidplyr"). But it generates the error message

Downloading GitHub repo hadley/multidplyr@master
from URL https://api.github.com/repos/hadley/multidplyr/zipball/master
Installing multidplyr
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --
no-restore --quiet CMD INSTALL  \
"C:/Users/FTXX/AppData/Local/Temp/RtmpEpOeM9/devtools34805943869/hadley-multidplyr-0085ded"  \
  --library="C:/Users/FTXX/Documents/R/win-library/3.4" --install-tests 

Installation failed: Command failed (65535)

How to fix this problem? I found that if the package is on CRAN, then the system has no problem with install.packages("abc"), but as long as it needs to install packages from github, it has this problem. I also tried to install other packages from github, it also has the same problem.

I've followed this instructions to installed the Rtools (latest version). However, this problem of install packages from github still there. And I also found this instruction to first download the source zip package multidplyr-master.zip and unzip it into the local folder where all R packages stored and run

source <- devtools:::source_pkg("C:/Users/FTXX/Documents/R/win-
library/3.4/multidplyr-master")
install(source)

However, it reports similar error

Installing multidplyr
"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --
no-restore --quiet CMD INSTALL  \
  "C:/Users/FTXX/Documents/R/win-library/3.4/multidplyr-master"  \
  --library="C:/Users/FTXX/Documents/R/win-library/3.4" --install-tests 

Error: Command failed (65535)

My R information is

 R.version
           _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          4.1                         
year           2017                        
month          06                          
day            30                          
svn rev        72865                       
language       R                           
version.string R version 3.4.1 (2017-06-30)
nickname       Single Candle     
KevinKim
  • 1,382
  • 3
  • 18
  • 34
  • 1
    Have you installed Rtools? You can't build on Windows without it. https://cran.r-project.org/bin/windows/Rtools/ – amatsuo_net Jul 25 '17 at 14:08
  • That might be the reason. I just tried `install.packages("Rtools")`, it says `package ‘Rtools’ is not available (for R version 3.4.1)`. Should I move back to older version of R? – KevinKim Jul 25 '17 at 14:12
  • 1
    RTools is not a package and can't be installed as such. See the link by amatsuo_net. – Axeman Jul 25 '17 at 14:14
  • @ftxx, Rtool is a windows executable, not a package. – amatsuo_net Jul 25 '17 at 14:22
  • @amatsuo_net Thanks! I've just followed [this](https://github.com/stan-dev/rstan/wiki/Install-Rtools-for-Windows) instruction and successfully installed the Rtools. However, it still does not solve the problem to install that package from github.... I also download that package and unzip it into the local folder where it stores all the r packages and run `source <- devtools:::source_pkg("C:/Users/FTXX/Documents/R/win-library/3.4/multidplyr-master");install(source)`. But it gives the same `Error: Command failed (65535)` – KevinKim Jul 25 '17 at 14:40
  • @Axeman thanks! I've just installed the Rtools. But it still does not solve the problem. I will update my post – KevinKim Jul 25 '17 at 14:41
  • You might have to install it in a path without any spaces, i.e. not in `Program Files`. (I've ran into that problem before, at least). – Axeman Jul 25 '17 at 14:55
  • @Axeman I just uninstalled my R and Rstudio and reinstall them directly under C:\R and C:Rstudio (also I have C:\Rtools there). And I also did some search, I found that `find_rtools(T)` generates `Error: running command '"C:/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD config CC' had status 65535`. I think this is the key, my installed `rtools` is not recognized. But I didn't find good solution to that – KevinKim Jul 25 '17 at 15:16

0 Answers0