how do you solve this error

hello,
just installed the latest version


R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

then installed devtools package

install.packages("devtools")
#this wa sucessfuly installed

then tried to install rspatial and threw the errors

if (!require("rspatial")) devtools::install_github('rspatial/rspatial')
Loading required package: rspatial
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.
Error: Failed to install 'unknown package' from GitHub:
  Timeout was reached: [api.github.com] Resolving timed out after 10000 milliseconds
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘rspatial’

then went ahead to try and install the missing package but still failed to install

install.packages("Rtools")
Installing package into ‘C:/Users/ShellHunter.DESKTOP-EO423F6/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘Rtools’ is not available (for R version 4.0.2)

then tried a different way of installing rspatial but still failed

install.packages("rspatial")
Installing package into ‘C:/Users/ShellHunter.DESKTOP-EO423F6/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘rspatial’ is not available (for R version 4.0.2)
1 Like