meztez / plumberDeploy

Other
50 stars 12 forks source link

Package Install Issues #32

Closed ries9112 closed 3 years ago

ries9112 commented 3 years ago

System details

Output of sessioninfo::session_info()():

─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.3 (2020-10-10)
 os       macOS  11.2.3               
 system   x86_64, darwin17.0          
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/Denver              
 date     2021-07-23                  

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package       * version     date       lib source                               
 analogsea       1.0.0       2021-06-01 [1] CRAN (R 4.0.2)                       
 askpass         1.1         2019-01-13 [1] CRAN (R 4.0.2)                       
 assertthat      0.2.1       2019-03-21 [1] CRAN (R 4.0.2)                       
 bitops          1.0-6       2013-08-17 [1] CRAN (R 4.0.2)                       
 cli             2.5.0       2021-04-26 [1] CRAN (R 4.0.3)                       
 colorspace      2.0-2       2021-06-24 [1] CRAN (R 4.0.2)                       
 crayon          1.4.1       2021-02-08 [1] CRAN (R 4.0.2)                       
 credentials     1.3.0       2020-07-21 [1] CRAN (R 4.0.2)                       
 curl            4.3.2       2021-06-23 [1] CRAN (R 4.0.2)                       
 DBI             1.1.0       2019-12-15 [1] CRAN (R 4.0.2)                       
 dplyr           1.0.5       2021-03-05 [1] CRAN (R 4.0.2)                       
 ellipsis        0.3.2       2021-04-29 [1] CRAN (R 4.0.2)                       
 fansi           0.4.2       2021-01-15 [1] CRAN (R 4.0.2)                       
 generics        0.1.0       2020-10-31 [1] CRAN (R 4.0.2)                       
 ggmap           3.0.0       2019-02-05 [1] CRAN (R 4.0.2)                       
 ggplot2         3.3.3       2020-12-30 [1] CRAN (R 4.0.2)                       
 glue            1.4.2       2020-08-27 [1] CRAN (R 4.0.2)                       
 gtable          0.3.0       2019-03-25 [1] CRAN (R 4.0.2)                       
 httr            1.4.2       2020-07-20 [1] CRAN (R 4.0.2)                       
 jpeg            0.1-8.1     2019-10-24 [1] CRAN (R 4.0.2)                       
 jsonlite        1.7.2       2020-12-09 [1] CRAN (R 4.0.2)                       
 lattice         0.20-41     2020-04-02 [1] CRAN (R 4.0.3)                       
 lifecycle       1.0.0       2021-02-15 [1] CRAN (R 4.0.2)                       
 magrittr        2.0.1       2020-11-17 [1] CRAN (R 4.0.2)                       
 munsell         0.5.0       2018-06-12 [1] CRAN (R 4.0.2)                       
 openssl         1.4.4       2021-04-30 [1] CRAN (R 4.0.2)                       
 pillar          1.6.0       2021-04-13 [1] CRAN (R 4.0.2)                       
 pkgconfig       2.0.3       2019-09-22 [1] CRAN (R 4.0.2)                       
 plumberDeploy   0.2.1.10000 2021-07-23 [1] Github (meztez/plumberDeploy@6f2aa7e)
 plyr            1.8.6       2020-03-03 [1] CRAN (R 4.0.2)                       
 png             0.1-7       2013-12-03 [1] CRAN (R 4.0.2)                       
 purrr           0.3.4       2020-04-17 [1] CRAN (R 4.0.2)                       
 R6              2.5.0       2020-10-28 [1] CRAN (R 4.0.2)                       
 Rcpp            1.0.6       2021-01-15 [1] CRAN (R 4.0.2)                       
 RgoogleMaps     1.4.5.3     2020-02-12 [1] CRAN (R 4.0.2)                       
 rjson           0.2.20      2018-06-08 [1] CRAN (R 4.0.2)                       
 rlang           0.4.11.9001 2021-07-23 [1] Github (r-lib/rlang@b9d6508)         
 scales          1.1.1       2020-05-11 [1] CRAN (R 4.0.2)                       
 sessioninfo     1.1.1       2018-11-05 [1] CRAN (R 4.0.2)                       
 sp              1.4-5       2021-01-10 [1] CRAN (R 4.0.2)                       
 ssh             0.8.0       2021-05-03 [1] CRAN (R 4.0.2)                       
 stringi         1.6.2       2021-05-17 [1] CRAN (R 4.0.2)                       
 stringr         1.4.0       2019-02-10 [1] CRAN (R 4.0.2)                       
 sys             3.4         2021-03-07 [1] Github (jeroenooms/sys@c4fd835)      
 tibble          3.1.0       2021-02-25 [1] CRAN (R 4.0.2)                       
 tidyr           1.1.3       2021-03-03 [1] CRAN (R 4.0.2)                       
 tidyselect      1.1.0       2020-05-11 [1] CRAN (R 4.0.2)                       
 utf8            1.2.1       2021-03-12 [1] CRAN (R 4.0.2)                       
 vctrs           0.3.8       2021-04-29 [1] CRAN (R 4.0.2)                       
 withr           2.4.2       2021-04-18 [1] CRAN (R 4.0.2)                       
 yaml            2.2.1       2020-02-01 [1] CRAN (R 4.0.2)                       

[1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library

Example application or steps to reproduce the problem

analogsea::install_r_package(package = 'dplyr', droplet = mydrop)

Describe the problem in detail

I am running into issues installing packages with the install_r_package() function and I'm unable to install a lot of packages, this is the output I get when I try installing dplyr for example:

image

I would also like to delete the LOCK file for the dependency that's failing (fansi), but when I ssh into the DigitalOcean droplet I'm not able to locate the directory with the R library of packages. These are the folders I see (most of them are hidden files/folders):

image

The one called .local seemed promising but doesn't seem to have the folder I'm looking for:

image

When I try install_github_r_package() I get the same result where it wants me to delete 00LOCK-fansi:

image

Any thoughts/suggestions?

meztez commented 3 years ago

Just tested it and I could not replicate what you have got. Anything else you ran before getting this error?

I ran

id <- plumberDeploy::do_provision()
analogsea::install_r_package(package = 'dplyr', droplet = id)
> sessioninfo::session_info()
- Session info ----------------------------------------------------------------------------
 setting  value                       
 version  R version 4.1.0 (2021-05-18)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/New_York            
 date     2021-07-24                  

- Packages --------------------------------------------------------------------------------
 package       * version     date       lib source        
 analogsea       1.0.0       2021-06-01 [1] CRAN (R 4.1.0)
 askpass         1.1         2019-01-13 [1] CRAN (R 4.0.5)
 cli             3.0.1       2021-07-17 [1] CRAN (R 4.1.0)
 credentials     1.3.0       2020-07-21 [1] CRAN (R 4.1.0)
 curl            4.3.1       2021-04-30 [1] CRAN (R 4.0.5)
 httr            1.4.2       2020-07-20 [1] CRAN (R 4.0.5)
 jsonlite        1.7.2       2020-12-09 [1] CRAN (R 4.0.5)
 magrittr        2.0.1       2020-11-17 [1] CRAN (R 4.0.5)
 openssl         1.4.4       2021-04-30 [1] CRAN (R 4.0.5)
 plumberDeploy * 0.2.1.10000 2021-07-24 [1] local         
 R6              2.5.0       2020-10-28 [1] CRAN (R 4.0.5)
 sessioninfo     1.1.1       2018-11-05 [1] CRAN (R 4.1.0)
 ssh             0.8.0       2021-05-03 [1] CRAN (R 4.1.0)
 sys             3.4         2020-07-23 [1] CRAN (R 4.0.5)
 withr           2.4.2       2021-04-18 [1] CRAN (R 4.0.5)
 yaml            2.2.1       2020-02-01 [1] CRAN (R 4.0.5)

[1] C:/Program Files/R/R-4.1.0/library
meztez commented 3 years ago

I would also like to delete the LOCK file for the dependency that's failing (fansi), but when I ssh into the DigitalOcean droplet I'm not able to locate the directory with the R library of packages. These are the folders I see (most of them are hidden files/folders):

sudo rm /usr/local/lib/R/site-library/00LOCK-*

You cd (current directory) into your profile home folder while the lock files are in /usr/local/lib/R/site-library.

You are running your commands here : /home/root

To get to the base of your directories tree do cd /

If you do an ls -al from there you will see all folders.

Good luck

ries9112 commented 3 years ago

Yesss, that worked, THANK YOU!

I doubt it will be helpful to anyone else, but in my case I had to add -rf dir to delete the directory, so:

sudo rm /usr/local/lib/R/site-library/00LOCK-* -rf dir

This is great, thank you for the thoughtful explanation (sorry, should have realized the cd / command myself), and for the really awesome code snippet. dplyr successfully installed without any issues now! As to what I did, I think just some other standard package installs, perhaps a problem when I tried installing the tidyverse with the same command, but not 100% sure.

ries9112 commented 3 years ago

One more follow-up. I think my issues originated from not having xml2 installed and that being a dependency for the tidyverse.

I fixed the issue by going back into my droplet and running the command:

apt install libxml2-dev

After installing this dependency I was able to successfully install the tidyverse package as well.

Thanks again!