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
Related
I am running R under macOS Catalina 10.15.5 (can't update to the newest version because it requires 17GB and it doesn't have so much space).
Yesterday, RStudio stopped working (not loading libraries that used to work for me, like dplyr or tidyverse).
After trying some codes like
update.package(checkBuilt = TRUE)
nothing changed. I have decided to uninstall and install again both R and RStudio, but nothing improved.
Error (e.g.: Tidyverse):
> install.packages("tidyverse", type="binary")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/tidyverse_1.3.2.tgz'
Content type 'application/x-gzip' length 420896 bytes (411 KB)
==================================================
downloaded 411 KB
The downloaded binary packages are in
/var/folders/83/1hdhv2r97017s9xxs6yj5hl00000gn/T//Rtmp8tahja/downloaded_packages
> library(tidyverse)
**Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):**
** there is no package called ‘vctrs’**
The version I am running:
> version
_
platform x86_64-apple-darwin17.0
arch x86_64
os darwin17.0
system x86_64, darwin17.0
status
major 4
minor 2.2
year 2022
month 10
day 31
svn rev 83211
language R
version.string R version 4.2.2 (2022-10-31)
nickname Innocent and Trusting
> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/4.2/Resources/library"
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.4.5 usethis_2.1.6
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 compiler_4.2.2 later_1.3.0 urlchecker_1.0.1 prettyunits_1.1.1 profvis_0.3.7
[7] remotes_2.4.2 tools_4.2.2 digest_0.6.30 pkgbuild_1.3.1 pkgload_1.3.2 memoise_2.0.1
[13] lifecycle_1.0.3 rlang_1.0.6 shiny_1.7.3 cli_3.4.1 rstudioapi_0.14 curl_4.3.3
[19] fastmap_1.1.0 withr_2.5.0 stringr_1.4.1 fs_1.5.2 htmlwidgets_1.5.4 rprojroot_2.0.3
[25] glue_1.6.2 R6_2.5.1 processx_3.8.0 sessioninfo_1.2.2 purrr_0.3.5 callr_3.7.3
[31] magrittr_2.0.3 promises_1.2.0.1 ps_1.7.2 ellipsis_0.3.2 htmltools_0.5.3 mime_0.12
[37] xtable_1.8-4 httpuv_1.6.6 stringi_1.7.8 miniUI_0.1.1.1 cachem_1.0.6 crayon_1.5.2
> packageVersion('tidyverse')
[1] ‘1.3.2’
EDIT
> install.packages("vctrs")
There is a binary version available but the source version is later:
binary source needs_compilation
vctrs 0.5.0 0.5.1 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘vctrs’
trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.5.1.tar.gz'
Content type 'application/x-gzip' length 959562 bytes (937 KB)
==================================================
downloaded 937 KB
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘vctrs’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/83/1hdhv2r97017s9xxs6yj5hl00000gn/T/Rtmp8tahja/downloaded_packages’
> library(vctrs)
Error in library(vctrs) : there is no package called ‘vctrs’
Any help on how to solve it?
By just dowloading the Command Line Tools package from Apple Developers adapted to the current macOS version solved the problem.
Problem
I am trying to install biomaRt R package, but I have been experiencing problems. I have also noticed that the same problem also occurs with some other packages like twitteR. It seems like it is a problem related to curl.
When I run the following installation command below:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("biomaRt")
I receive the following error message:
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.3 (2020-02-29)
Installing package(s) 'biomaRt'
also installing the dependency ‘BiocFileCache’
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/BiocFileCache_1.10.2.tar.gz'
Content type 'application/x-gzip' length 288347 bytes (281 KB)
==================================================
downloaded 281 KB
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/biomaRt_2.42.1.tar.gz'
Content type 'application/x-gzip' length 431995 bytes (421 KB)
==================================================
downloaded 421 KB
* installing *source* package ‘BiocFileCache’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/local/lib/R/site-library/curl/libs/curl.so: undefined symbol: curl_easy_strerror, version CURL_OPENSSL_3
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
Question
Have you experienced something similar? If so, how did you solve it?
Attempts to solve
Tried to install RCurl package as mentioned here, but it did not help.
Tried installing libcurl3 as mentioned here. However, it breaks down R installation.
Tried re-installing R.
And none of above worked for me.
R session info
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 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_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] crayon_1.3.4 dplyr_1.0.2 grid_3.6.3 R6_2.4.1 gtable_0.3.0 lifecycle_0.2.0
[7] magrittr_1.5 scales_1.1.1 ggplot2_3.3.2 pillar_1.4.6 rlang_0.4.7 rstudioapi_0.11
[13] vctrs_0.3.4 generics_0.0.2 ellipsis_0.3.1 tools_3.6.3 glue_1.4.2 munsell_0.5.0
[19] purrr_0.3.4 compiler_3.6.3 colorspace_1.4-1 pkgconfig_2.0.3 BiocManager_1.30.10 tidyselect_1.1.0
[25] tibble_3.0.3
While I was writing this thread, I came across a simple solution.
Basically uninstalling and installing R curl package helped.
remove.packages("curl")
install.packages("curl")
I am trying to install lme4ord from github and receiving the following error:
remotes::install_github("stevencarlislewalker/lme4ord")
Downloading GitHub repo stevencarlislewalker/lme4ord#master
checking for file ‘/tmp/RtmpngUWJn/remotes2a0c5ce3f7b/stevencarlislewalker-lme4ord-5f62664/DESCRIP✔ checking for file ‘/tmp/RtmpngUWJn/remotes2a0c5ce3f7b/stevencarlislewalker-lme4ord-5f62664/DESCRIPTION’ (625ms)
─ preparing ‘lme4ord’:
✔ checking DESCRIPTION meta-information
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘lme4ord_0.0-3.tar.gz’
Installing package into ‘/home/localuserdir/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package ‘lme4ord’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: object ‘sigma’ is not exported by 'namespace:lme4'
Execution halted
ERROR: lazy loading failed for package ‘lme4ord’
* removing ‘/home/localuserdir/R/x86_64-redhat-linux-gnu-library/3.6/lme4ord’
Error: Failed to install 'lme4ord' from GitHub:
(converted from warning) installation of package ‘/tmp/RtmpngUWJn/file2a0c7b718e3a/lme4ord_0.0-3.tar.gz’ had non-zero exit status
My sessionInfo is:
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 30 (Workstation Edition)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] remotes_2.1.0 lme4_1.1-21 Matrix_1.2-17
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 magrittr_1.5 splines_3.6.0 MASS_7.3-51.4
[5] lattice_0.20-38 R6_2.4.0 minqa_1.2.4 tcltk_3.6.0
[9] tools_3.6.0 pkgbuild_1.0.3 grid_3.6.0 nlme_3.1-139
[13] cli_1.1.0 withr_2.1.2 assertthat_0.2.1 rprojroot_1.3-2
[17] crayon_1.3.4 processx_3.4.1 nloptr_1.2.1 callr_3.3.1
[21] ps_1.3.0 curl_4.0 compiler_3.6.0 backports_1.1.4
[25] prettyunits_1.0.2 boot_1.3-22
I have seen some discussions of namespace interactions (whether sigma is loaded from base or lme4) in earlier versions (3.2 or less) of R, but everything here should be up to date.
Any ideas?
Whenever I try to install any packages in R I now get this error. This didn't used to happen and is new within the last month and seems to be ubiquitous across all packages I try to install.
I am using R studio but the error occurred when I tried to use just R alone, as well. Currently trying to install rscopus package but the error occurs with most all packages I have tried to install.
Thanks.
Console:
installing the source package ‘rscopus’
trying URL 'https://cran.rstudio.com/src/contrib/rscopus_0.6.3.tar.gz'
Content type 'application/x-gzip' length 40422 bytes (39 KB)
==================================================
downloaded 39 KB
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/New_York'
* installing *source* package ‘rscopus’ ...
** package ‘rscopus’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error : object ‘as_tibble’ is not exported by 'namespace:dplyr'
ERROR: lazy loading failed for package ‘rscopus’
* removing
‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rscopus’
Warning in install.packages :
installation of package ‘rscopus’ had non-zero exit status
The downloaded source packages are in ‘/private/var/folders/wz/p_wg38vx11vcp94hhcw5dv_w0000gn/T/RtmpaJeH3b/downloaded_packages’
Sessioninfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS 10.14.1
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tibble_1.3.4 DescTools_0.99.21 dplyr_0.5.0 car_2.1-4
loaded via a namespace (and not attached):
[1] Rcpp_0.12.11 magrittr_1.5 splines_3.3.2 MASS_7.3-45 lattice_0.20-34
[6] R6_2.2.0 rlang_0.1.6 minqa_1.2.4 tools_3.3.2 nnet_7.3-12
[11] parallel_3.3.2 pbkrtest_0.4-6 grid_3.3.2 nlme_3.1-128 mgcv_1.8-15
[16] quantreg_5.29 DBI_0.5-1 MatrixModels_0.4-1 lme4_1.1-12 assertthat_0.1
[21] manipulate_1.0.1 Matrix_1.2-7.1 nloptr_1.0.4 boot_1.3-18 expm_0.999-2
[26] mvtnorm_1.0-6 SparseM_1.74 foreign_0.8-67
For anyone else with similar issues, I updated to the newest version of R and it seemed to solve the problem.
Thinking back to the origin of the problem, it coincided with updated to OS X Mojave.
I'm running R v3.2.0 with RStudio as well. The machine I'm running on has no internet access and therefore I'm having to download and install packages locally. I am trying to install ggplot2 which requires lots of dependecies (with their own dependencies) to be downloaded and installed. I have arrived at the point where most of them have been installed. However, I still get the following when I try:
> install.packages("~/R_packages/ggplot2_2.0.0.tar.gz", repos = NULL, type = "source")
Installing package into ‘/u01/app/oracle/product/12.1.0.2/dbhome_1/R/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
No protocol specified
Warning in fun(libname, pkgname) : couldn't connect to display ":0"
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/u01/app/oracle/product/12.1.0.2/dbhome_1/R/library/scales/libs/scales.so':
/u01/app/oracle/product/12.1.0.2/dbhome_1/R/library/scales/libs/scales.so: invalid ELF header
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/u01/app/oracle/product/12.1.0.2/dbhome_1/R/library/ggplot2’
Warning in install.packages :
installation of package ‘/home/oracle/R_packages/ggplot2_2.0.0.tar.gz’ had non-zero exit status
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
Has anyone got any ideas why this is happening?
Edit:
Oracle Distribution of R version 3.2.0 (--)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Oracle Linux Server 6.7
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8
[10] LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.4.2 stringi_0.4-1 nnet_7.3-9 randomForest_4.6-10 ROracle_1.2-1
[6] DBI_0.3.1 rpart_4.1-9 ORCH_2.5.1 ORCHstats_2.5.1 ORCHcore_2.5.1
[11] rJava_0.9-7 OREstats_1.5 MASS_7.3-40 OREbase_1.5 OREcommon_1.5
loaded via a namespace (and not attached):
[1] Rcpp_0.12.2 png_0.1-7 assertthat_0.1 R6_2.0.1 grid_3.2.0 OREembed_1.5 magrittr_1.5
[8] tools_3.2.0 parallel_3.2.0
Edit 2:
library(ggplot2)
No protocol specified
Attaching package: ‘ggplot2’
The following object is masked from ‘package:randomForest’:
margin
Warning message:
In fun(libname, pkgname) : couldn't connect to display ":0"