I can't install package "bsts":
> install.packages("bsts")
also installing the dependencies ‘BoomSpikeSlab’, ‘Boom’
There are binary versions available but the source versions are later:
binary source needs_compilation
BoomSpikeSlab 0.5.2 0.7.0 TRUE
Boom 0.2 0.5 FALSE
bsts 0.6.2 0.6.5 TRUE
Binaries will be installed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/BoomSpikeSlab_0.5.2.zip'
Content type 'application/zip' length 2359323 bytes (2.3 MB)
downloaded 2.3 MB
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/bsts_0.6.2.zip'
Content type 'application/zip' length 2612461 bytes (2.5 MB)
downloaded 2.5 MB
package ‘BoomSpikeSlab’ successfully unpacked and MD5 sums checked
package ‘bsts’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\R612965\AppData\Local\Temp\RtmpMRjXXu\downloaded_packages
installing the source package ‘Boom’
trying URL 'http://cran.rstudio.com/src/contrib/Boom_0.5.tar.gz'
Content type 'application/x-gzip' length 1061942 bytes (1.0 MB)
downloaded 1.0 MB
* installing *source* package 'Boom' ...
** package 'Boom' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "Makevars" -f "C:/FAST/R/323F40~1.1/etc/i386/Makeconf"
-f "C:/FAST/R/323F40~1.1/share/make/winshlib.mk" CXX='$(CXX1X) $(CXX1XSTD)'
CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)'
SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)'
SHLIB="Boom.dll" ' had status 127
ERROR: compilation failed for package 'Boom'
* removing 'C:/FAST/R/3.2.1/library/Boom'
Warning in install.packages :
running command '"C:/FAST/R/323F40~1.1/bin/x64/R" CMD INSTALL -l
"C:\FAST\R\3.2.1\library" C:\Users\R612965
\AppData\Local\Temp\RtmpMRjXXu/downloaded_packages/Boom_0.5.tar.gz' had status 1
Warning in install.packages :
installation of package ‘Boom’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\R612965\AppData\Local\Temp\RtmpMRjXXu\downloaded_packages’
I have also tried install dependencies 'BoomSpikeSlab' and 'Boom' first which returns me very similar issue like the one above - 'had status 127'. Directly install from source file like tar.gz is also not working. How can I approach this issue?
I have also attached my session information below:
R version 3.2.1 (2015-06-18)
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 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BH_1.60.0-2 sqldf_0.4-10 RSQLite_1.0.0 DBI_0.5-1 gsubfn_0.6-6 proto_1.0.0 dtplyr_0.0.1 data.table_1.9.6 reshape2_1.4.2
[10] scales_0.4.1 gtable_0.2.0 dplyr_0.5.0 devtools_1.12.0 httr_1.2.1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.7 magrittr_1.5 munsell_0.4.3 colorspace_1.2-7 R6_2.2.0 stringr_1.1.0 plyr_1.8.4 tcltk_3.2.1 tools_3.2.1
[10] grid_3.2.1 git2r_0.15.0 withr_1.0.2 assertthat_0.1 digest_0.6.10 tibble_1.2 curl_2.2 memoise_1.0.0 stringi_1.1.2
[19] chron_2.3-47
I am using Windows 7 op.
Related
I am trying to install the R package mapview on Ubuntu but I get the error:
ERROR: lazy loading failed for package ‘mapview’
I have tried installing both the CRAN version of mapview and the development version, ie, by:
remotes::install_github("r-spatial/mapview")
In either case, I always get variations of the same message:
> install.packages("mapview")
Installing package into ‘/home/<my user name>/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/mapview_2.10.0.tar.gz'
Content type 'application/x-gzip' length 1683417 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘mapview’ ...
** package ‘mapview’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
corrupted size vs. prev_size
Aborted (core dumped)
ERROR: lazy loading failed for package ‘mapview’
* removing ‘/home/<my username>/R/x86_64-pc-linux-gnu-library/4.1/mapview’
Warning in install.packages :
installation of package ‘mapview’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpKtQmnI/downloaded_packages’
If I try the development version, it asks me to update other packages (eg, raster) but then the same problem occurs for that package.
Other postings have suggested that the error can be fixed by restarting the R session. I have not found this to be the case.
My Session Info is:
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_NZ.UTF-8 LC_NUMERIC=C LC_TIME=en_NZ.UTF-8
[4] LC_COLLATE=en_NZ.UTF-8 LC_MONETARY=en_NZ.UTF-8 LC_MESSAGES=en_NZ.UTF-8
[7] LC_PAPER=en_NZ.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] rstudioapi_0.13 magrittr_2.0.1 usethis_2.1.3 devtools_2.4.3 pkgload_1.2.4
[6] R6_2.5.1 rlang_0.4.12 fastmap_1.1.0 tools_4.1.2 pkgbuild_1.2.1
[11] sessioninfo_1.2.2 cli_3.1.0 withr_2.4.3 ellipsis_0.3.2 remotes_2.4.2
[16] rprojroot_2.0.2 lifecycle_1.0.1 crayon_1.4.2 processx_3.5.2 purrr_0.3.4
[21] callr_3.7.0 fs_1.5.1 ps_1.6.0 testthat_3.1.1 curl_4.3.2
[26] memoise_2.0.1 glue_1.6.0 cachem_1.0.6 compiler_4.1.2 desc_1.4.0
[31] prettyunits_1.1.1
I can't reproduce your error, but you could solve it by installing R with Conda and then the package with https://anaconda.org/conda-forge/r-mapview
I have successfully installed and loaded readxl package. When I am trying to use the function readxl::read_xlsx(), it throws and error that R cannot find pkgconfig.
I have tried to install this package, but it throws another error, which is presented below:
Installing package into ‘C:/Users/Maintenant Prêt!/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
pkgconfig 2.0.2 2.0.3 FALSE
installing the source package ‘pkgconfig’
trying URL 'https://cran.rstudio.com/src/contrib/pkgconfig_2.0.3.tar.gz'
Content type 'application/x-gzip' length 6080 bytes
downloaded 6080 bytes
* installing *source* package 'pkgconfig' ...
** package 'pkgconfig' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
cannot open file 'C:/Users/Maintenant Prjt!/Documents/R/win-library/3.6/00LOCK-pkgconfig/00new/pkgconfig/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'pkgconfig'
* removing 'C:/Users/Maintenant Prêt!/Documents/R/win-library/3.6/pkgconfig'
Warning in install.packages :
installation of package ‘pkgconfig’ had non-zero exit status
I have checked and there are no hidden 00LOCK folders in packages folder, which can conflict with installation. My three suggestions are: (1) either there are no writing rights to this folder (which is wired since all packages are installed normally), (2) or a special symbol ê in the name of the parent folder creates problems.
Does anyone know a workaround?
Here are results of the sessionInfo() and .libPaths():
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
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 base
other attached packages:
[1] readxl_1.3.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 crayon_1.3.4 assertthat_0.2.1 cellranger_1.1.0
[5] R6_2.4.0 magrittr_1.5 pillar_1.4.2 rlang_0.4.0
[9] rstudioapi_0.10 tools_3.6.1 glue_1.3.1 compiler_3.6.1
and
[1] "C:/Users/Maintenant Prêt!/Documents/R/win-library/3.6"
[2] "C:/Program Files/R/R-3.6.1/library"
My session info (basically it's Microsoft R Open 3.4.1, RStudio 1.0.153, Windows 10 64 bit)
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
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
[5] datasets methods base
other attached packages:
[1] RevoUtilsMath_10.0.1
loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.4.1
[3] R6_2.2.0 RevoUtils_10.0.6
[5] tools_3.4.1 withr_2.0.0
[7] curl_2.6 memoise_1.1.0
[9] git2r_0.19.0 digest_0.6.12
[11] devtools_1.13.3
I'm trying to install some RStudio addins without success. Whatever addin I try to install, the recommended procedure of using devtools::install_github (see Installation) fails with the same error message:
> devtools::install_github("benmarwick/wordcountaddin", type = "source", dependencies = TRUE)
Installation failed: Failure when receiving data from the peer
> devtools::install_github("rstudio/addinexamples", type = "source")
Installation failed: Failure when receiving data from the peer
I work behind a company proxy. I am able to install R packages from CRAN without problems:
> install.packages("devtools")
Installing package into ....
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/devtools_1.13.3.zip'
Content type 'application/zip' length 443758 bytes (433 KB)
downloaded 433 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
....
How can I install RStudio addins?
You can install from github using proxy settings with httr package:
library(httr)
with_config(use_proxy(url='proxy url', port = port_number,
username="username", password="yourpass"),
devtools::install_github('github/directory'))
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
I am trying to install the Gains package in R Studio Version 3.1.2 like this:
install.packages("gains")
The following warnings appear:
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1
Warning in install.packages :package ‘gains’ is not available (for R version 3.1.2)
Does anyone know how can I fix this?
Thanks!
I believe that the problem lies in your corrupted, incomplete or otherwise incorrect R environment. I was able to install that package without any problems at all just by issuing the default command:
> install.packages("gains")
Installing package into ‘C:/Users/Alex/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/gains_1.1.zip'
Content type 'application/zip' length 35802 bytes (34 Kb)
opened URL
downloaded 34 Kb
package ‘gains’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Alex\AppData\Local\Temp\RtmpSSRths\downloaded_packages
> sessionInfo()
R version 3.1.1 (2014-07-10)
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 methods
[7] base
loaded via a namespace (and not attached):
[1] tools_3.1.1
As a quick solution to the problem, I suggest to specify CRAN mirror explicitly:
install.packages("gains", repos = "http://cran.rstudio.com")