jthomasmock / gtExtras

A Collection of Helper Functions for the gt Package.
https://jthomasmock.github.io/gtExtras/
Other
193 stars 26 forks source link

Found permission denied error when attempting to install gtExtras #24

Closed davegarofalo closed 2 years ago

davegarofalo commented 2 years ago

Executed the following lines in r Studio: install.packages("remotes") remotes::install_github("jthomasmock/gtExtras")

Log is below. Note errors at end.

Note also r Studio is trying to install a file from R\win-library\4.1\00LOCK\glue\libs\x64\glue.dll and getting a permission denied error, but I can't even find the 00LOCK directory at all.

install.packages("remotes") Installing package into ‘C:/Users/Cast Iron Commode/OneDrive - symplr/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/remotes_2.4.1.zip' Content type 'application/zip' length 398754 bytes (389 KB) downloaded 389 KB

package ‘remotes’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\Cast Iron Commode\AppData\Local\Temp\RtmpusrL7y\downloaded_packages

remotes::install_github("jthomasmock/gtExtras") Downloading GitHub repo jthomasmock/gtExtras@HEAD These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: glue (1.4.2 -> 1.5.0) [CRAN] 5: tibble (3.1.5 -> 3.1.6) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1 glue (1.4.2 -> 1.5.0) [CRAN] tibble (3.1.5 -> 3.1.6) [CRAN] prismatic (NA -> 1.1.0) [CRAN] systemfonts (NA -> 1.0.3) [CRAN] webshot (NA -> 0.5.2) [CRAN] fontawesome (NA -> 0.2.2) [CRAN] paletteer (NA -> 1.4.0) [CRAN] svglite (NA -> 2.0.0) [CRAN] Installing 8 packages: glue, tibble, prismatic, systemfonts, webshot, fontawesome, paletteer, svglite Warning: package ‘tibble’ is in use and will not be installed Installing packages into ‘C:/Users/Cast Iron Commode/OneDrive - symplr/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified)

There is a binary version available but the source version is later: binary source needs_compilation glue 1.4.2 1.5.0 TRUE

Binaries will be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/glue_1.4.2.zip' Content type 'application/zip' length 155693 bytes (152 KB) downloaded 152 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/prismatic_1.1.0.zip' Content type 'application/zip' length 791816 bytes (773 KB) downloaded 773 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/systemfonts_1.0.3.zip' Content type 'application/zip' length 2014424 bytes (1.9 MB) downloaded 1.9 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/webshot_0.5.2.zip' Content type 'application/zip' length 145693 bytes (142 KB) downloaded 142 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/fontawesome_0.2.2.zip' Content type 'application/zip' length 1529170 bytes (1.5 MB) downloaded 1.5 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/paletteer_1.4.0.zip' Content type 'application/zip' length 427861 bytes (417 KB) downloaded 417 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/svglite_2.0.0.zip' Content type 'application/zip' length 1162263 bytes (1.1 MB) downloaded 1.1 MB

package ‘glue’ successfully unpacked and MD5 sums checked Warning: cannot remove prior installation of package ‘glue’ Warning: restored ‘glue’ package ‘prismatic’ successfully unpacked and MD5 sums checked package ‘systemfonts’ successfully unpacked and MD5 sums checked package ‘webshot’ successfully unpacked and MD5 sums checked package ‘fontawesome’ successfully unpacked and MD5 sums checked package ‘paletteer’ successfully unpacked and MD5 sums checked package ‘svglite’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\Cast Iron Commode\AppData\Local\Temp\RtmpusrL7y\downloaded_packages Running R CMD build...

Rows: 608 Columns: 16 -- Column specification -------------------------------------------------------- Delimiter: "," chr (4): conf, division, team, playoff dbl (12): season, wins, losses, ties, pct, div_rank, scored, allowed, net, s...

i Use spec() to retrieve the full column specification for this data. i Specify the column types or set show_col_types = FALSE to quiet this message. Error in head(.) : could not find function "head" Calls: %>% Execution halted Warning messages: 1: In file.copy(savedcopy, lib, recursive = TRUE) : problem copying C:\Users\Cast Iron Commode\OneDrive - symplr\Documents\R\win-library\4.1\00LOCK\glue\libs\x64\glue.dll to C:\Users\Cast Iron Commode\OneDrive - symplr\Documents\R\win-library\4.1\glue\libs\x64\glue.dll: Permission denied 2: In i.p(...) : installation of package ‘C:/Users/CASTIR~1/AppData/Local/Temp/RtmpusrL7y/file1ebc470064e3/gtExtras_0.2.2.11.tar.gz’ had non-zero exit status

davegarofalo commented 2 years ago

UPDATE: Tried to install glue by itself (I have 1.4.2 downloaded but need 1.5.0) and got the following warning:

install.packages("glue") Error in install.packages : Updating loaded packages install.packages("glue") Installing package into ‘C:/Users/Cast Iron Commode/OneDrive - symplr/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified)

There is a binary version available but the source version is later: binary source needs_compilation glue 1.4.2 1.5.0 TRUE

installing the source package ‘glue’

trying URL 'https://cran.rstudio.com/src/contrib/glue_1.5.0.tar.gz' Content type 'application/x-gzip' length 106650 bytes (104 KB) downloaded 104 KB

-- Attaching packages --------------------------------------- tidyverse 1.3.1 -- v ggplot2 3.3.5 v purrr 0.3.4 v tibble 3.1.5 v dplyr 1.0.7 v tidyr 1.1.4 v stringr 1.4.0 v readr 2.0.2 v forcats 0.5.1

Rows: 608 Columns: 16 -- Column specification -------------------------------------------------------- Delimiter: "," chr (4): conf, division, team, playoff dbl (12): season, wins, losses, ties, pct, div_rank, scored, allowed, net, s...

i Use spec() to retrieve the full column specification for this data. i Specify the column types or set show_col_types = FALSE to quiet this message. Error in head(.) : could not find function "head" Calls: %>% Execution halted Warning in install.packages : installation of package ‘glue’ had non-zero exit status

jthomasmock commented 2 years ago

Howdy!

I'm confused why there is package loading and reading of a file at the bottom.

IE:

-- Attaching packages --------------------------------------- tidyverse 1.3.1 --
v ggplot2 3.3.5 v purrr 0.3.4
v tibble 3.1.5 v dplyr 1.0.7
v tidyr 1.1.4 v stringr 1.4.0
v readr 2.0.2 v forcats 0.5.1

Rows: 608 Columns: 16
-- Column specification --------------------------------------------------------
Delimiter: ","
chr (4): conf, division, team, playoff
dbl (12): season, wins, losses, ties, pct, div_rank, scored, allowed, net, s...

i Use spec() to retrieve the full column specification for this data.
i Specify the column types or set show_col_types = FALSE to quiet this message.
Error in head(.) : could not find function "head"
Calls: %>%
Execution halted
Warning in install.packages :
installation of package ‘glue’ had non-zero exit status

Can you completely close out the RStudio/R session, open a new R session (ie no loading of packages, execution of code, etc). And then run the install? Don't select update for any of the packages.

remotes::install_github("jthomasmock/gtExtras")
davegarofalo commented 2 years ago

Hey there, Thomas (do you prefer "Thomas"?) thanks so much for your reply. It turns out I had entered some commands in my .Rprofile that were firing each time I started R Studio. I cleared that out and the weird errors we saw are gone. However, when I attempted to install gtExtras, I found the following warnings:

remotes::install_github('jthomasmock/gtExtras') Downloading GitHub repo @.*** These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All 2: CRAN packages only 3: None 4: glue (1.4.2 -> 1.5.0) [CRAN] 5: tibble (3.1.5 -> 3.1.6) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1 glue (1.4.2 -> 1.5.0) [CRAN] tibble (3.1.5 -> 3.1.6) [CRAN] Installing 2 packages: glue, tibble Installing packages into ‘C:/Users/Cast Iron Commode/OneDrive - symplr/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified)

There are binary versions available but the source versions are later: binary source needs_compilation glue 1.4.2 1.5.0 TRUE tibble 3.1.5 3.1.6 TRUE

Binaries will be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/glue_1.4.2.zip' Content type 'application/zip' length 155693 bytes (152 KB) downloaded 152 KB

trying URL ' https://cran.rstudio.com/bin/windows/contrib/4.1/tibble_3.1.5.zip' Content type 'application/zip' length 871287 bytes (850 KB) downloaded 850 KB

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

The downloaded binary packages are in C:\Users\Cast Iron Commode\AppData\Local\Temp\Rtmpe2hTzk\downloaded_packages Running R CMD build...

Not sure why I am getting "Permission denied" since I have access to the directory and I can copy paste into it. Dave

On Mon, Nov 15, 2021 at 12:00 PM Thomas Mock @.***> wrote:

Howdy!

I'm confused why there is package loading and reading of a file at the bottom.

IE:

-- Attaching packages --------------------------------------- tidyverse 1.3.1 --

v ggplot2 3.3.5 v purrr 0.3.4

v tibble 3.1.5 v dplyr 1.0.7

v tidyr 1.1.4 v stringr 1.4.0

v readr 2.0.2 v forcats 0.5.1

Rows: 608 Columns: 16

-- Column specification --------------------------------------------------------

Delimiter: ","

chr (4): conf, division, team, playoff

dbl (12): season, wins, losses, ties, pct, div_rank, scored, allowed, net, s...

i Use spec() to retrieve the full column specification for this data.

i Specify the column types or set show_col_types = FALSE to quiet this message.

Error in head(.) : could not find function "head"

Calls: %>%

Execution halted

Warning in install.packages :

installation of package ‘glue’ had non-zero exit status

Can you completely close out the RStudio/R session, open a new R session (ie no loading of packages, execution of code, etc). And then run the install?

remotes::install_github("jthomasmock/gtExtras")

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jthomasmock/gtExtras/issues/24#issuecomment-969113584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWM33WXHVYC5AJ5W6XSWK6TUME4BPANCNFSM5H6DQHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jthomasmock commented 2 years ago

Gotcha - that makes a lot more sense now.

It looks like you have a corrupted install of glue. Not sure if you're on a work machine where you have limited access, but you can try:

I noticed earlier that you are installing libraries into OneDrive. While that can work out ok, it can get into weird states in that you are syncing things back and forth. I'd consider it more appropriate for files over software. IE you could store R Projects, .R, .Rmds, etc in OneDrive, but installing R itself or package libraries there can likely lead to some of the path/library situations that you appear to be in.

davegarofalo commented 2 years ago

Hey there Thomas, thanks again for your help. It turns out it was that doggone rprofile again. I pretty much had to nuke the file, and that helped, but in order to remove the One Drive reference, I had to actually change the default Windows "Document' directory in File Explorer. Once I did this, it updated the HOME variable, and the One Drive references were removed. Then I was able to install gtExtras and it seems to be running better. Dave

On Mon, Nov 15, 2021 at 1:59 PM Thomas Mock @.***> wrote:

Gotcha - that makes a lot more sense now.

It looks like you have a corrupted install of glue. Not sure if you're on a work machine where you have limited access, but you can try:

  • remove.packages('glue') to remove the existing glue install
  • install.packages('glue') to install glue alone
  • THEN try remotes::install_github("jthomasmock/gtExtras") and select 3 to NOT update any other packages.

I noticed earlier that you are installing libraries into OneDrive. While that can work out ok, it can get into weird states in that you are syncing things back and forth. I'd consider it more appropriate for files over software. IE you could store R Projects, .R, .Rmds, etc in OneDrive, but installing R itself or package libraries there can likely lead to some of the path/library situations that you appear to be in.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jthomasmock/gtExtras/issues/24#issuecomment-969219458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWM33WWNYIYO4CX6UT4PJI3UMFKCHANCNFSM5H6DQHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jthomasmock commented 2 years ago

Glad it was resolved!