I just updated to 2023.12.1 from 2023.09.? Didn't note the previously installed version, sorry. On trying to build an existing book project, it quickly fails, complaining that:
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'htmltools' 0.5.3 is already loaded, but >= 0.5.4 is required
Calls: local ... is_bs_theme -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::gitbook'.
Execution halted
On trying to update packages, I get the dialog suggesting I restart R before update, and I click Yes. It then fails the install, and repeats the cycle with the dialog again.
In the installation process, it also complains:
install.packages("htmltools")
Error in install.packages : Updating loaded packages
install.packages("htmltools")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
The presence of the path containing 00LOCK is likely a problem. Try uninstalling htmltools. If that (allegedly) succeeds, check to make sure the 00LOCK path no longer exists. If it persists, try deleting it. Once 00LOCK is gone, try installing htmltools again.
Thanks, but in the packages list, htmltools doesn't appear. Is there another way to uninstall it? Also, RTools doesn't appear, but was in another complaint, and I am unable to install it.
UPDATE: Part of the problem appears to be that I need to run RStudio as Administrator.
Are you saying that if (in RStudio) you click on the Packages tab, then click the Install button, then (with the Install from: box set to Repository (CRAN)) type htmltools in the Packages box, it is not listed?
Correct -- because that lists installed packages, and you do not (yet) have it installed. So try deleting the directory with 00LOCK in the path and then try installing it.
C:\Users\wmeyer\AppData\Local\R\win-library\4.2\00LOCK\htmltools\libs\x64
Does not exist.
C:\Users\wmeyer\AppData\Local\R\win-library\4.2
Does not contain 00LOCK
I do not find it in the list of installed packages. But when I attempt to build the book, I now get this:
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 1.0.5 is already loaded, but >= 1.0.6 is required
Calls: local ... asNamespace -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::gitbook'.
Execution halted
Exited with status 1.
Attempting to update rlang, I get the dialog to restart the R session, and then this:
Restarting R session...
install.packages("rlang")
Error in install.packages : Updating loaded packages
And the dialog again presents. If I click no this time, I get:
install.packages("rlang")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
I would suggest shutting down RStudio and restarting it (without loading any scripts or documents) before attempting to install or update any packages, to reduce the likelihood that the package you are updating is already active in memory.
Did you install RTools? Note that RTools is not an R library; it's a separate program, which is apparently need to compile the source code for R libraries. (I'm on Linux, where the tool chain for compiling libraries is already installed.) So you don't install it within RStudio; you download the exe file from the site you linked, run it to install RTools, and then try installing/updating R libraries.
OK, decided to uninstall.reinstall R, to get the 4.3 level. Then downloaded and installed RTools. Then ran RStudio as Admin, and again tried to update rlang, which again failed, again complaining that RTools is not installed. Surely there must be steps which will walk me through this. I am ready to uninstall the whole chain and start over. My confidence in RStudio updates has plummeted. UPDATE: The short answer, the one that actually solves the problem, is this: