doomlab / MeMoBootR

A package for mediation, moderation, and bootstrapped indirect effects
MIT License
21 stars 7 forks source link

Cant install MeMoBootR #6

Closed yourfoodiate closed 3 years ago

yourfoodiate commented 3 years ago

I'm not sure if anyone has similar problems but I get this when I try to download MeMoBootR in R via

devtools::install_github("doomlab/MeMoBootR")

I get this message in the end (in the console):

Downloading GitHub repo doomlab/MeMoBootR@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: rlang (0.4.10 -> 0.4.11) [CRAN] 5: pillar (1.4.7 -> 1.6.1 ) [CRAN] 6: fansi (0.4.2 -> 0.5.0 ) [CRAN] 7: tibble (3.1.1 -> 3.1.2 ) [CRAN] 8: shape (1.4.5 -> 1.4.6 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: Error: Failed to install 'MeMoBootR' from GitHub: System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty

This is when I don't update any of the packages. Updating the pacakges results in the same thing but with more errors, if that helps:

devtools::install_github("doomlab/MeMoBootR") Downloading GitHub repo doomlab/MeMoBootR@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: rlang (0.4.10 -> 0.4.11) [CRAN] 5: pillar (1.4.7 -> 1.6.1 ) [CRAN] 6: fansi (0.4.2 -> 0.5.0 ) [CRAN] 7: tibble (3.1.1 -> 3.1.2 ) [CRAN] 8: shape (1.4.5 -> 1.4.6 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1 rlang (0.4.10 -> 0.4.11) [CRAN] pillar (1.4.7 -> 1.6.1 ) [CRAN] fansi (0.4.2 -> 0.5.0 ) [CRAN] tibble (3.1.1 -> 3.1.2 ) [CRAN] shape (1.4.5 -> 1.4.6 ) [CRAN] Installing 5 packages: rlang, pillar, fansi, tibble, shape Installing packages into ‘C:/Users/user/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

There are binary versions available but the source versions are later: binary source needs_compilation pillar 1.6.0 1.6.1 FALSE fansi 0.4.2 0.5.0 TRUE tibble 3.1.1 3.1.2 TRUE shape 1.4.5 1.4.6 FALSE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.11.zip' Content type 'application/zip' length 1224139 bytes (1.2 MB) downloaded 1.2 MB

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

The downloaded binary packages are in C:\Users\user\AppData\Local\Temp\Rtmpc9VAJT\downloaded_packages installing the source packages ‘pillar’, ‘fansi’, ‘tibble’, ‘shape’

trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.1.tar.gz' Content type 'application/x-gzip' length 1111747 bytes (1.1 MB) downloaded 1.1 MB

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

trying URL 'https://cran.rstudio.com/src/contrib/tibble_3.1.2.tar.gz' Content type 'application/x-gzip' length 686145 bytes (670 KB) downloaded 670 KB

trying URL 'https://cran.rstudio.com/src/contrib/shape_1.4.6.tar.gz' Content type 'application/x-gzip' length 677262 bytes (661 KB) downloaded 661 KB

The downloaded source packages are in ‘C:\Users\user\AppData\Local\Temp\Rtmpc9VAJT\downloaded_packages’ Error: Failed to install 'MeMoBootR' from GitHub: System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty In addition: Warning messages: 1: In file.copy(savedcopy, lib, recursive = TRUE) : problem copying C:\Users\user\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\user\Documents\R\win-library\3.6\rlang\libs\x64\rlang.dll: Permission denied 2: In i.p(...) : installation of package ‘fansi’ had non-zero exit status 3: In i.p(...) : installation of package ‘shape’ had non-zero exit status 4: In i.p(...) : installation of package ‘pillar’ had non-zero exit status 5: In i.p(...) : installation of package ‘tibble’ had non-zero exit status

Does anyone know how to deal with this? I tried running RStudio as admin and that didn't work.

doomlab commented 3 years ago

@yourfoodiate

This is an issue with devtools handling of current package versions and newer versions of R. Use this to fix it:

Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")
devtools::install_github("doomlab/MeMoBootR")