0

I cannot install rgeos or rgdal packages in R version 4.1.3. These packages worked fine a month ago before I reformatted my computer and reinstalled R.

This is what I have tried:

install.packages('rgeos', type="source")
install.packages('rgdal', type="source")

This is the message I get when installing - and I DO have Rtools installed.

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
        
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/bhauptman/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgeos_0.5-9.tar.gz'
Content type 'application/x-gzip' length 290240 bytes (283 KB)
downloaded 283 KB
        
* installing *source* package 'rgeos' ...
** package 'rgeos' successfully unpacked and MD5 sums checked
** using staged installation
        
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'rgeos'
* removing 'C:/Users/bhauptman/Documents/R/win-library/4.1/rgeos'
* restoring previous 'C:/Users/bhauptman/Documents/R/win-library/4.1/rgeos'
Warning in install.packages :
installation of package ‘rgeos’ had non-zero exit status
        
The downloaded source packages are in           ‘C:\Users\bhauptman\AppData\Local\Temp\Rtmp0sTf6q\downloaded_packages’
BHope
  • 135
  • 9
  • 1
    R's current version is 4.1.3. You are probably referring to RStudio's version #, which is unlikely to be causing the issue. What error message are you getting when you try to install the packages? – Phil Mar 31 '22 at 03:24
  • 1
    Reformatted, as in wipe your hard drive, reinstall linux or windows? Are you linux or windows? likely a substantial number of underlying libs needing to be rebuild. – Chris Mar 31 '22 at 03:33
  • If `library(rgeos)` gives that error, then something went wrong during `install.packages('rgeos', type="source")`. Please show the full output of that command. – MrFlick Mar 31 '22 at 03:47
  • Yes I wiped my hard drive and reinstalled windows. How would determine which libs need reuilding? – BHope Mar 31 '22 at 17:45
  • To compile from source you have to have RTools installed: https://cran.r-project.org/bin/windows/Rtools/ – Grzegorz Sapijaszko Apr 01 '22 at 18:39

1 Answers1

-1

You need to download and install rtools to get make. https://cran.r-project.org/bin/windows/Rtools/history.html

Tony
  • 1