Unable to install packages with remotes::install_version() - 'make' not found

Hi,
I have been trying to install previous version of selected R packages (in particular dartR).

I always used versions::install.version("dartR", version="2.7.2",
repos ="http://cran.us.r-project.org",
lib="C:/Users/gabry/AppData/Local/R/win-library/4.3/4.3_dartR_2.7.2")

However, since MRAN retired, it seems that this option is not viable anymore, even if I indicate the repos = CRAN.
IT gives the following error:
<Error in download.file(url, file, quiet = TRUE) :
cannot open URL 'https://mran.revolutionanalytics.com/snapshot'

So, I tried remotes::install_version("dartR", version = "2.7.2",
repos = "http://cran.us.r-project.org",
lib="C:/Users/gabry/Documents/R/R_3.5_dartR2.7.2")

However, I keep getting the same error (even after I installed RTools & restarted the PC).
<
Installing 30 packages: bit, bit64, tzdb, vroom, readr, haven, backports, labelled, broom, broom.helpers, ggstats, mvtnorm, gtools, gdata, rbibutils, crosstalk, lazyeval, Rdpack, plotly, png, dotCall64, GGally, genetics, dismo, gap, RgoogleMaps, maps, spam, PopGenReport, fields
trying URL 'http://cran.us.r-project.org/src/contrib/bit_4.0.5.tar.gz'
Content type 'application/x-gzip' length 827745 bytes (808 KB)
downloaded 808 KB
...
...

  • installing source package 'bit' ...
    ** package 'bit' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"), : **
    ** 'make' not found
  • removing 'C:/Users/gabry/Documents/R/R_3.5_dartR2.7.2/bit'
  • installing source package 'tzdb' ...
    ** package 'tzdb' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    Error in system(paste(MAKE, p1(paste("-f", shQuote(makefiles))), "compilers"), :
    'make' not found
  • removing 'C:/Users/gabry/Documents/R/R_3.5_dartR2.7.2/tzdb'
    ...

and so on for a bunch of packages that I assume are the dependencies required for dartR.

and then the installation process continues with additional errors:

<* installing source package 'png' ...
** package 'png' 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:/PROGRA~1/R/R-43~1.3/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:/PROGRA~1/R/R-43~1.3/bin/x64/Rcmd.exe" config CFLAGS' had status 1
'sh' is not recognized as an internal or external command,
operable program or batch file.

and so on for a bunch of times...

From the various forums, I got the feeling that maybe RStudio cannot find RTools, even if installed in C:rtools43".
So, as suggested i tried:

Sys.getenv("BINPREF")
[1] ""
Sys.getenv("PATH")
[1]
c:\rtools43\x86_64-w64-mingw32.static.posix\bin;

  • c:\rtools43\usr\bin;*
  • C:\Program Files\R\R-4.3.3\bin\x64;*
  • C:\Program Files\Common Files\Oracle\Java\javapath;*
  • C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;*
  • C:\WINDOWS\System32\WindowsPowerShell\v1.0\;*
  • C:\WINDOWS\System32\OpenSSH\;C:\Program Files\MEGA-X;*
  • C:\Applied Biosystems\PeakScanner\;*
  • C:\Program Files (x86)\Applied Biosystems\QuantStudio Design & Analysis Software\bin;*
  • C:\Users\gabry\AppData\Local\Microsoft\WindowsApps;*
  • C:\Users\gabry\;*
  • C:\Users\gabry\AppData\Local\GitHubDesktop\bin;*
  • C:\Program Files\RStudio\resources\app\bin\quarto\bin;*
  • C:\Program Files\RStudio\resources\app\bin\postback"*

readLines("~/.Renviron")
Error in file(con, "r") : cannot open the connection

  • In addition: Warning message:*
  • In file(con, "r") :*
  • cannot open file 'C:/Users/gabry/Documents/.Renviron': No such file or directory*

readLines("~/.Rprofile")
Error in file(con, "r") : cannot open the connection

  • In addition: Warning message:*
  • In file(con, "r") :*
  • cannot open file 'C:/Users/gabry/Documents/.Rprofile': No such file or directory*

Then, I tried to set the BINPREF
Sys.setenv(BINPREF = "C:/rtools42/x86_64-w64-mingw32.static.posix/bin/")

but i get the exact same messages when i re-run install_version().

What should I do to fix the problem?

I need to work with various versions of the same package, and need to be able to install various and detach/load each alternatively when i need one or the other.
I have been able to do this so far, and never had this problem with "make not found".

Pls help!

I would appreciate any help as this is blocking my work progress!
Thanks!
Gabriella

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.