0

when I type install.packages(''swirl) , I got the following error.

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/Tanvir ahmed/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified)

There is a binary version available but the source version is later: binary source needs_compilation swirl 2.4.3 2.4.5 FALSE

installing the source package ‘swirl’

trying URL 'https://cran.rstudio.com/src/contrib/swirl_2.4.5.tar.gz' Content type 'application/x-gzip' length 108847 bytes (106 KB) downloaded 106 KB

  • installing source package 'swirl' ... ** package 'swirl' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called 'bitops' ERROR: lazy loading failed for package 'swirl'
  • removing 'C:/Users/Tanvir ahmed/Documents/R/win-library/3.4/swirl' Warning in install.packages : running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\Tanvir ahmed\Documents\R\win-library\3.4" C:\Users\TANVIR~1\AppData\Local\Temp\RtmpywcBFw/downloaded_packages/swirl_2.4.5.tar.gz' had status 1 Warning in install.packages : installation of package ‘swirl’ had non-zero exit status

The downloaded source packages are in ‘C:\Users\Tanvir ahmed\AppData\Local\Temp\RtmpywcBFw\downloaded_packages’

How can I fix the problem? Thanks in advance.

  • Did it pop up a message asking if you wanted to install from source? What did you say? I'd suggest you stick to the binary version. `install.packages(''swirl", type="binary")` Aslo are you really running R 3.4? I might also suggest that you update your R to a more recent version R 4.0.2 is out now. – MrFlick Jul 14 '20 at 20:11
  • You can also try installing the missing dependency with `install.packages("bitops")` – MrFlick Jul 14 '20 at 20:14
  • My R version is 3.4.1 and I am using the latest RStudio version.@MrFlick – Tanvir Ahmed Jul 14 '20 at 20:17

0 Answers0