Installation failed: had non-zero exit status - r

I am trying to install the development version of "metafor" package using
remotes::install_github("wviechtb/metafor")
However, I have the following error message. I tried setting dependencies and force to TRUE with no success.
.
.
.
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/mihir/OneDrive/Dokumente/R/win-library/4.0/metafor'
* restoring previous 'C:/Users/mihir/OneDrive/Dokumente/R/win-library/4.0/metafor'
Error: Failed to install 'metafor' from GitHub:
(converted from warning) installation of package ‘C:/Users/mihir/AppData/Local/Temp/RtmpWcutv3/file121421b71d54/metafor_2.5-54.tar.gz’ had non-zero exit status.
` sessionInfo()`
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3

Related

Fixing rlang access denied

Can't seem to find a viable solution getting rlang to install after updating rstudio.
I tried using --no lock on builder tools https://work.sparktseung.com/pages/2021-09-06-R-build-package-permission/
Also tried uninstalling it and reinstalling w/ remove.packages this hasn't worked for me either after restarting.
> library(rlang)
Error in library(rlang) : there is no package called ‘rlang’
> remove.packages("rlang")
Removing package from ‘C:/Users/user/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘rlang’
Restarting R session...
> library(rlang)
Error in library(rlang) : there is no package called ‘rlang’
Here's the error when trying to install via url
Warning in file.rename(instdir, final_instdir) :
cannot rename file 'C:/Users/user/AppData/Local/R/win-library/4.2/00LOCK-rlang/00new/rlang' to 'C:/Users/user/AppData/Local/R/win-library/4.2/rlang', reason 'Access is denied'
ERROR: moving to final location failed
* removing 'C:/Users/user/AppData/Local/R/win-library/4.2/rlang'
Warning in install.packages :
installation of package ‘C:/Users/user/AppData/Local/Temp/Rtmp8sB5rS/downloaded_packages/rlang_1.0.5.tar.gz’ had non-zero exit status
Install Line
install.packages("https://cran.r-project.org/src/contrib/Archive/rlang/rlang_1.0.5.tar.gz", repo=NULL, type="source")
Session Info
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0
Really need to run some scripts, any help would be appreciated.

Error in installing tidyverse package in Rstudio

I am New to R programming. I am using R studio presently. I received the following error while installing the tidyverse package
Installing package into ‘C:/Users/mandava/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/tidyverse_1.1.1.zip'
Content type 'application/zip' length 41908 bytes (40 KB)
downloaded 40 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mandava\AppData\Local\Temp\RtmpGw5Iny\downloaded_packages
My details :
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] tools_3.3.2
Don't worry about the error, the package is installed.

Cannot Install Caret

I've been looking at StackOverflow forums like this and this but I cannot find a problem.
What I'm having an issue with is that I cannot install the caret package because the dependencies cannot be installed. I even tried to run install.packages("caret", dependencies = T) and that failed. I have also tried install.packages("caret", dependencies = c("Depends", "Suggests")) and it failed on installing rPython dependencies.
There seems to be issues saying that there is a configuration script and that I need to manually configure it.
I tried installing car, lme4, and other dependencies manually but only ggplot2 was able to be installed correctly. I have no idea what else to do, below is my session Info. Please help!
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] codetools_0.2-14
loaded via a namespace (and not attached):
[1] tools_3.2.2 data.table_1.9.6 chron_2.3-47
did you try downloading the packages manually from CRAN and installing them manually from Rstudio? Some of the packages require rebooting the Rstudio after package installation or after package inclusion in the Rscript. That worked for me..
also, try installing different versions of the packages until one of them works for your case..that's what I did in the case of "ggvis package

Error with installing an old package

A co-worked built a model using both an older version of R (3.1.3) and an older version of randomForestSRC (1.6.0). I have R version 3.2.1 and randomForestSRC version 1.6.1. I was able to install an older version of the randomForestSRC package using the function InstallOldPackage from the repmis package using R 3.2.1. However, it turns out I need to use the old version (3.1.3) to be able to work on this project. Unfortunately, after switching to 3.1.3 I am having trouble actually installing the older version of the randomForestSRC package.
Here is the system info:
> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2012 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] repmis_0.4.4 randomForestSRC_1.6.1
loaded via a namespace (and not attached):
[1] chron_2.3-47 data.table_1.9.6 digest_0.6.8 httr_1.0.0 magrittr_1.5
[6] plyr_1.8.3 R.cache_0.10.0 R.methodsS3_1.7.0 R.oo_1.19.0 R.utils_2.1.0
[11] R6_2.1.1 Rcpp_0.12.1 stringi_1.0-1 stringr_1.0.0 tools_3.1.3
This is where I run into the error (I apologize for the large block of text):
> library(repmis)
> InstallOldPackages(pkgs = "randomForestSRC",versions = "1.6.0")
trying URL 'http://cran.r- project.org/src/contrib/Archive/randomForestSRC/randomForestSRC_1.6.0.tar.gz'
Content type 'application/x-gzip' length 943881 bytes (921 KB)
opened URL
downloaded 921 KB
* installing *source* package 'randomForestSRC' ...
** package 'randomForestSRC' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/Users/baasman/DOCUME~1/R/R- 31~1.3/etc/i386/Makeconf" -f "C:/Users/baasman/DOCUME~1/R/R- 31~1.3/share/make/winshlib.mk" SHLIB="randomForestSRC.dll" OBJECTS="bootstrap.o classification.o dataParser.o entry.o factorOps.o importance.o impute.o nodeOps.o nrutil.o random.o regression.o rfsrc.o rfsrcUtil.o split.o splitClas.o splitCustom.o splitRegr.o splitSurv.o splitUspv.o splitUtil.o stack.o stackOutput.o stackPreDefined.o survival.o survivalE.o termOps.o trace.o tree.o treeUtil.o"' had status 127
ERROR: compilation failed for package 'randomForestSRC'
* removing 'C:/Users/baasman/Documents/R/R-3.1.3/library/randomForestSRC'
* restoring previous 'C:/Users/baasman/Documents/R/R- 3.1.3/library/randomForestSRC'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\Users\baasman\Documents\R\R-3.1.3\library\00LOCK- randomForestSRC\randomForestSRC\libs\x64\randomForestSRC.dll to C:\Users\baasman\Documents\R\R- 3.1.3\library\randomForestSRC\libs\x64\randomForestSRC.dll: Permission denied
Warning in install.packages :
running command '"C:/Users/baasman/DOCUME~1/R/R-31~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\baasman\Documents\R\R-3.1.3\library" "randomForestSRC_1.6.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘randomForestSRC_1.6.0.tar.gz’ had non-zero exit status
pkgs V1
1 randomForestSRC 0

Installation error of slidifyLibraries from github

I installed slidify following instructions from here. I installed the windows binaries and started a slidify.rmd file successfully, but I could not install the slidifyLibraries, which makes the build crash. This is the error that follows:
* checking for file 'C:\Users\Roger\AppData\Local\Temp\RtmpYrHr6k\ramnathv-slidifyLibraries-8e8e781/DESCRIPTION' ... OK
* preparing 'slidifyLibraries':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'slidifyLibraries_0.1.tar.gz'
ERROR
packaging into .tar.gz failed
Error: Command failed (1)
In addition: Warning message:
running command '"C:/NEWPRO~1/R-215~1.2/bin/x64/R" --vanilla CMD build "C:\Users\Roger\AppData\Local\Temp\RtmpYrHr6k\ramnathv-slidifyLibraries-8e8e781" --no-manual --no-resave-data' had status 1
When installing Rtools I was directed to install them directly from cran, which I did. This is the session info:
R version 2.15.2 (2012-10-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
other attached packages:
[1] slidify_0.3.1
loaded via a namespace (and not attached):
[1] digest_0.6.0 evaluate_0.4.3 formatR_0.7
[4] knitr_0.9 markdown_0.5.3 stringr_0.6.2
[7] tools_2.15.2 whisker_0.1 yaml_2.1.5

Resources