Devtools: Problema al instalar en Windows

Creado en 11 jun. 2016  ·  5Comentarios  ·  Fuente: r-lib/devtools

Rtools instalado según las instrucciones

> library(devtools)
> build_github_devtools()
> "C:/PROGRA~1/R/R-33~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

Warning message:
running command 'make -f "C:/PROGRA~1/R/R-33~1.0/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.0/share/make/winshlib.mk" SHLIB="foo.dll" WIN=64 TCLBIN=64 OBJECTS="foo.o"' had status 127 
Error: Command failed (1)
bug install

Comentario más útil

Esa solución del problema 429 de STAT545 funcionó para mí en Windows 10. Es decir, ejecutar find_rtools() led has_devel() para funcionar:


R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"

> install.packages("devtools")
Installing package into ‘C:/Users/SFirke/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/devtools_1.12.0.zip'
Content type 'application/zip' length 433071 bytes (422 KB)
downloaded 422 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\SFirke\AppData\Local\Temp\Rtmp8uWd7f\downloaded_packages
> library(devtools)
> install_github("hadley/devtools")
Downloading GitHub repo hadley/devtools<strong i="8">@master</strong>
from URL https://api.github.com/repos/hadley/devtools/zipball/master
Installing devtools
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/SFirke/AppData/Local/Temp/Rtmp8uWd7f/devtools1a4c463575d4/hadley-devtools-d8ab190" --library="C:/Users/SFirke/Documents/R/win-library/3.3" --install-tests 

* installing *source* package 'devtools' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
Error : package 'devtools' is not installed for 'arch = i386'
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/SFirke/Documents/R/win-library/3.3/devtools'
* restoring previous 'C:/Users/SFirke/Documents/R/win-library/3.3/devtools'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying C:\Users\SFirke\Documents\R\win-library\3.3\00LOCK-hadley-devtools-d8ab190\devtools\libs\x64\devtools.dll to C:\Users\SFirke\Documents\R\win-library\3.3\devtools\libs\x64\devtools.dll: Permission denied
Error: Command failed (1)
> devtools::build_github_devtools()
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

Warning message:
running command 'make -f "C:/PROGRA~1/R/R-33~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.2/share/make/winshlib.mk" SHLIB="foo.dll" WIN=64 TCLBIN=64 OBJECTS="foo.o"' had status 127 
Error: Command failed (1)
> 
> find_rtools()
[1] TRUE
> has_devel()
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

C:/RBuildTools/3.4/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.2/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c foo.c -o foo.o
C:/RBuildTools/3.4/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.2/bin/x64 -lR
[1] TRUE
> build_github_devtools()
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

C:/RBuildTools/3.4/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.2/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c foo.c -o foo.o
C:/RBuildTools/3.4/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.2/bin/x64 -lR
Downloading devtools from https://github.com/hadley/devtools/archive/master.zip
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:\Users\SFirke\AppData\Local\Temp\Rtmp8uWd7f\devtools-master" --build 

* installing to library 'C:/Users/SFirke/AppData/Local/Temp/Rtmp8uWd7f/temp_libpath1a4c1a06874'
* installing *source* package 'devtools' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* MD5 sums
packaged installation of 'devtools' as devtools_1.12.0.9000.zip
* DONE (devtools)
Renaming file to ./devtools.zip

Todos 5 comentarios

Parece aplicarse tanto a Rtools34 como a 33

Session info -----------------------------------------------------------------------------------------------------------   ----------------
 setting  value                       
 version  R version 3.3.0 (2016-05-03)
 system   x86_64, mingw32             
 ui       RStudio (0.99.1212)         
 language (EN)                        
  collate  English_Canada.1252         
 tz       America/Los_Angeles         
 date     2016-06-11                  

 Packages -------------------------------------------------------------------------------------------------------------------------------
 package  * version date       source        
 devtools * 1.11.1  2016-04-21 CRAN (R 3.3.0)
 digest     0.6.9   2016-01-08 CRAN (R 3.3.0)
 memoise    1.0.0   2016-01-29 CRAN (R 3.3.0)
  withr      1.0.1   2016-02-04 CRAN (R 3.3.0)

Esa solución del problema 429 de STAT545 funcionó para mí en Windows 10. Es decir, ejecutar find_rtools() led has_devel() para funcionar:


R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"

> install.packages("devtools")
Installing package into ‘C:/Users/SFirke/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/devtools_1.12.0.zip'
Content type 'application/zip' length 433071 bytes (422 KB)
downloaded 422 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\SFirke\AppData\Local\Temp\Rtmp8uWd7f\downloaded_packages
> library(devtools)
> install_github("hadley/devtools")
Downloading GitHub repo hadley/devtools<strong i="8">@master</strong>
from URL https://api.github.com/repos/hadley/devtools/zipball/master
Installing devtools
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/SFirke/AppData/Local/Temp/Rtmp8uWd7f/devtools1a4c463575d4/hadley-devtools-d8ab190" --library="C:/Users/SFirke/Documents/R/win-library/3.3" --install-tests 

* installing *source* package 'devtools' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
Error : package 'devtools' is not installed for 'arch = i386'
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/SFirke/Documents/R/win-library/3.3/devtools'
* restoring previous 'C:/Users/SFirke/Documents/R/win-library/3.3/devtools'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying C:\Users\SFirke\Documents\R\win-library\3.3\00LOCK-hadley-devtools-d8ab190\devtools\libs\x64\devtools.dll to C:\Users\SFirke\Documents\R\win-library\3.3\devtools\libs\x64\devtools.dll: Permission denied
Error: Command failed (1)
> devtools::build_github_devtools()
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

Warning message:
running command 'make -f "C:/PROGRA~1/R/R-33~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.2/share/make/winshlib.mk" SHLIB="foo.dll" WIN=64 TCLBIN=64 OBJECTS="foo.o"' had status 127 
Error: Command failed (1)
> 
> find_rtools()
[1] TRUE
> has_devel()
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

C:/RBuildTools/3.4/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.2/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c foo.c -o foo.o
C:/RBuildTools/3.4/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.2/bin/x64 -lR
[1] TRUE
> build_github_devtools()
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

C:/RBuildTools/3.4/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.2/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c foo.c -o foo.o
C:/RBuildTools/3.4/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.2/bin/x64 -lR
Downloading devtools from https://github.com/hadley/devtools/archive/master.zip
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:\Users\SFirke\AppData\Local\Temp\Rtmp8uWd7f\devtools-master" --build 

* installing to library 'C:/Users/SFirke/AppData/Local/Temp/Rtmp8uWd7f/temp_libpath1a4c1a06874'
* installing *source* package 'devtools' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* MD5 sums
packaged installation of 'devtools' as devtools_1.12.0.9000.zip
* DONE (devtools)
Renaming file to ./devtools.zip

La solución sugerida de ejecutar find_rtools() luego has_devel() funcionó para mí. Descargué e instalé Rtools y luego hice lo siguiente

# R version 3.3.3 (2017-03-06)
# Platform: x86_64-w64-mingw32/x64 (64-bit)
# Running under: Windows >= 8 x64 (build 9200)

install.packages("devtools")
library(devtools)
has_devel()  # has error
find_rtools()
has_devel()  # now it works

La salida fue

> install.packages("devtools")
Installing package into ‘C:/Users/Mark/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/devtools_1.13.1.zip'
Content type 'application/zip' length 440212 bytes (429 KB)
downloaded 429 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Mark\AppData\Local\Temp\RtmpW2jpI5\downloaded_packages
> library(devtools)
> has_devel()  # has error
"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

Warning message:
running command 'make -f "C:/PROGRA~1/R/R-33~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.3/share/make/winshlib.mk" SHLIB="foo.dll" WIN=64 TCLBIN=64 OBJECTS="foo.o"' had status 127 
Error: Command failed (1)
> find_rtools()
[1] TRUE
> has_devel()  # now it works
"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c 

C:/RBuildTools/3.4/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.3/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c foo.c -o foo.o
C:/RBuildTools/3.4/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.3/bin/x64 -lR
[1] TRUE

Estoy en win10 con R 3.4.1 x64. todo funciona bien, excepto rtools, que no se reconoce con rstudio (devtools). No puedo compilar y cargar desde la fuente y, naturalmente, no puedo instalar devtools desde github. En mi sesión obtengo:

encontrar_herramientas (T)
Error: ejecutar el comando '"C: /PROGRA~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environment --no-save --no-restore - -quiet CMD config CC 'tenía estado 2
Sys.which ("ls.exe")
ls.exe
"C: \ rtools \ bin \ ls.exe"
Sys.which ("gcc.exe")
gcc.exe
"c: \ rtools \ mingw_64 \ bin \ gcc.exe"

ejecutar el comando en cmd devuelve:

C: Usersfarid> r --no-site-file --no-environment --no-save --no-restore --quiet CMD config cc
make: / etc / x64 / Makeconf: No existe tal archivo o directorio
make: /share/make/config.mk: No existe tal archivo o directorio
make: * No hay regla para hacer el objetivo /share/make/config.mk'. Stop. make: /etc/x64/Makeconf: No such file or directory make: /share/make/config.mk: No such file or directory make: *** No rule to make target /share/make/config.mk '.


/share/make/config.mk'. Stop. make: /etc/x64/Makeconf: No such file or directory make: /share/make/config.mk: No such file or directory make: *** No rule to make target /share/make/config.mk '. Parada.
make: / etc / x64 / Makeconf: No existe tal archivo o directorio
make: /share/make/config.mk: No existe tal archivo o directorio
make: ** No hay regla para hacer target `/share/make/config.mk '. Parada.
ERROR: no hay información para la variable 'cc'

Este antiguo problema se ha bloqueado automáticamente. Si cree que ha encontrado un problema relacionado, presente un nuevo problema (con reprex) y enlace a este problema. https://reprex.tidyverse.org/

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

stevecondylios picture stevecondylios  ·  3Comentarios

bastistician picture bastistician  ·  6Comentarios

shirdekel picture shirdekel  ·  5Comentarios

hadley picture hadley  ·  3Comentarios

ctbrown picture ctbrown  ·  4Comentarios