"unable to install packages"

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: (unfortunatey I cannot seem to download any packages)...I try basic readxl...hit the "install" button; "install from: Repository(CRAN); packages "readxl" or readxl. Either results in unable t access index for repository.

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Administrator/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
'lib = "C:/Users/Administrator/Documents/R/win-library/4.0"' is not writable
Error in install.packages : unable to install packages---

another example: attempted to install dtplyr...
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘pillar’
In addition: Warning message:
package ‘dplyr’ was built under R version 4.0.5

There are at least 3 completely seperate issues here.

  1. Rtools
  2. install packages lib path not writeable
  3. dtplyr lack pillar dependancy

ok, so 1)
If you are on Windows machine and want to be able to compile packages from source then it is recommend that you follow the provided link (I repeat it : Using Rtools40 on Windows) , read, and follow these instructions.

  1. lib = "C:/Users/Administrator/Documents/R/win-library/4.0"' is not writable
    Is this path writeable ? could you use file explore and go to the path, and do a file new text file into there and succeed ? are you challenged for password etc ?
    Here is an old but probably still useful guide about libPath configuration
    How to Change the Default Library in Rstudio to a Different Default Library or Custom Library (accelebrate.com)
  2. Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘pillar’

In general if you are installing some package ('x') and there is an error saying there is no package ('y'), try installing package 'y' before again installing package 'x').
in your case try
install.packages('pillar')

but you likely need to address issues 1 + 2 before you can do things like 3 confidently.

Good luck !

1 Like

This is so cumbesome I installed a new R and R studio, just to be safe.
Still comes up defective. Here are the exact steps I take. My computer is Windows 10
install.packages('pillar')
console response:

install.packages('pillar')
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/
Warning in install.packages :
'lib = "D:/Program Files/R/R-4.1.0/library"' is not writable

also a pop up asking me if I want to put this in a "personal

This topic was automatically closed after 45 days. 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.