rstudio / htmltools

Tools for HTML generation and output
https://rstudio.github.io/htmltools/
213 stars 67 forks source link

Installation error - `htmltools.dll: Permission denied` #424

Closed Emanuel-1986 closed 1 month ago

Emanuel-1986 commented 5 months ago

Hi When trying to install HTML tools, I am getting the error below:

install.packages("htmltools") Installing package into ‘C:/Users/Schembri/AppData/Local/R/win-library/4.3’ (as ‘lib’ is unspecified) trying URL 'https://ftp.belnet.be/mirror/CRAN/bin/windows/contrib/4.3/htmltools_0.5.7.zip' Content type 'application/zip' length 357951 bytes (349 KB) downloaded 349 KB

package ‘htmltools’ successfully unpacked and MD5 sums checked Warning: cannot remove prior installation of package ‘htmltools’ Warning: restored ‘htmltools’

The downloaded binary packages are in C:\Users\Schembri\AppData\Local\Temp\RtmpG8FQtJ\downloaded_packages Warning message: In file.copy(savedcopy, lib, recursive = TRUE) : problem copying C:\Users\Schembri\AppData\Local\R\win-library\4.3\00LOCK\htmltools\libs\x64\htmltools.dll to C:\Users\Schembri\AppData\Local\R\win-library\4.3\htmltools\libs\x64\htmltools.dll: Permission denied

What can I do? Thanks. Emanuel

gadenbuie commented 5 months ago

In file.copy(savedcopy, lib, recursive = TRUE) : problem copying C:\Users\Schembri\AppData\Local\R\win-library\4.3\00LOCK\htmltools\libs\x64\htmltools.dll to C:\Users\Schembri\AppData\Local\R\win-library\4.3\htmltools\libs\x64\htmltools.dll: Permission denied

Usually this is a sign that the htmltools package is in use in an R process on your computer. Try finding the R session that's using htmltools (or just close all of your R sessions). There's also a chance that pak would better handle this installation.

Rikkiff commented 2 months ago

@Emanuel-1986. I get the same error message when attempting to updage htmltools. Restarted the computer before installation, so the issue seems not to be the package already running in my case. Did you find a solution?

I also get the following error message: cannot remove prior installation of package ‘htmltools’ Warning in install.packages : problem copying C:\Users\vi2285\AppData\Local\R\win-library\4.3\00LOCK\htmltools\libs\x64\htmltools.dll to C:\Users\vi2285\AppData\Local\R\win-library\4.3\htmltools\libs\x64\htmltools.dll: Permission denied However, no folder named C:\Users\vi2285\AppData\ exists on my computer.

Best, Rikki

stahengik commented 1 month ago

In file.copy(savedcopy, lib, recursive = TRUE) : problem copying C:\Users\Schembri\AppData\Local\R\win-library\4.3\00LOCK\htmltools\libs\x64\htmltools.dll to C:\Users\Schembri\AppData\Local\R\win-library\4.3\htmltools\libs\x64\htmltools.dll: Permission denied

Usually this is a sign that the htmltools package is in use in an R process on your computer. Try finding the R session that's using htmltools (or just close all of your R sessions). There's also a chance that pak would better handle this installation.

This worked, I had other R sessions open, that was preventing

gadenbuie commented 1 month ago

Thanks for confirmation @stahengik!