r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
643 stars 56 forks source link

pak Package Installation Error #532

Closed brichard1638 closed 10 months ago

brichard1638 commented 10 months ago

Upon an attempt to install the pak package in RStudio, the following output is generated, which results in an inability to successfully install the pak package:

There is a binary version available but the source version is later: binary source needs compilation pak 0.5.1 0.6.0 FALSE

installing the source package ‘pak’

trying URL 'https://cran.rstudio.com/src/contrib/pak_0.6.0.tar.gz' Content type 'application/x-gzip' length 177661 bytes (173 KB) downloaded 173 KB

installing source package 'pak' ... package 'pak' successfully unpacked and MD5 sums checked using staged installation 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config CC' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config CFLAGS' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config CXX' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config CXXFLAGS' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config CPPFLAGS' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config LDFLAGS' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config FC' had status 1 'sh' is not recognized as an internal or external command, operable program or batch file. Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x), : running command '"C:/PROGRA1/R/R-431.1/bin/x64/Rcmd.exe" config FCFLAGS' had status 1 Error in (function (...) : wrong length for argument

gaborcsardi commented 10 months ago

You don't seem to have the tools to install pak from source (i.e. Rtools43), so choose the binary version. Or install a pak binary from our repo, see https://pak.r-lib.org/reference/install.html