stan-dev / rstanarm

rstanarm R package for Bayesian applied regression modeling
https://mc-stan.org/rstanarm
GNU General Public License v3.0
385 stars 132 forks source link

ERROR: failed to lock directory when installing rstanarm #543

Open kamaulindhardt opened 3 years ago

kamaulindhardt commented 3 years ago

What is happening with rstanarm when I try to install/update?

> install.packages("tidyposterior")
Installing package into ‘/Users/kamaulindhardt_1/Library/R/3.6/library’
(as ‘lib’ is unspecified)
also installing the dependency ‘rstanarm’

  There are binary versions available but
  the source versions are later:
              binary source needs_compilation
rstanarm      2.19.2 2.21.1              TRUE
tidyposterior  0.0.3  0.1.0             FALSE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) cancel
Error in install.packages : Cancelled by user
> install.packages("rstanarm")
Installing package into ‘/Users/kamaulindhardt_1/Library/R/3.6/library’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
         binary source needs_compilation
rstanarm 2.19.2 2.21.1              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) no
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rstanarm_2.19.2.tgz'
Content type 'application/x-gzip' length 33305501 bytes (31.8 MB)
==================================================
downloaded 31.8 MB

The downloaded binary packages are in
    /var/folders/6p/c87kn7652k3bb9lw5j3c2rn00000gp/T//RtmpFmhYGc/downloaded_packages
> library(rstanarm)
Loading required package: Rcpp
rstanarm (Version 2.19.2, packaged: 2019-10-01 20:20:33 UTC)
- Do not expect the default priors to remain the same in future rstanarm versions.
Thus, R scripts should specify priors explicitly, even if they are just the defaults.
- For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores())
- bayesplot theme set to bayesplot::theme_default()
   * Does _not_ affect other ggplot2 plots
   * See ?bayesplot_theme_set for details on theme setting
Warning message:
package ‘Rcpp’ was built under R version 3.6.2 

Restarting R session...

> install.packages("rstanarm")
Installing package into ‘/Users/kamaulindhardt_1/Library/R/3.6/library’
(as ‘lib’ is unspecified)

 What is happening with `rstanarm` when I try to instal/update?

There is a binary version available but the source version is later:
         binary source needs_compilation
rstanarm 2.19.2 2.21.1              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘rstanarm’

trying URL 'https://cran.rstudio.com/src/contrib/rstanarm_2.21.1.tar.gz'
Content type 'application/x-gzip' length 3548723 bytes (3.4 MB)
==================================================
downloaded 3.4 MB

ERROR: failed to lock directory ‘/Users/kamaulindhardt_1/Library/R/3.6/library’ for modifying
Try removing ‘/Users/kamaulindhardt_1/Library/R/3.6/library/00LOCK-rstanarm’
Warning in install.packages :
  installation of package ‘rstanarm’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/6p/c87kn7652k3bb9lw5j3c2rn00000gp/T/Rtmp8Bbo3q/downloaded_packages’
bgoodri commented 2 years ago

Try removing '/Users/kamaulindhardt_1/Library/R/3.6/library/00LOCK-rstanarm'