cannot install custom library in R - r

I am trying to install a custom package that I worked on for a while after moving them to a new system. I am getting the following error.
Error: package or namespace load failed for ‘propSignals’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/boniface/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-propSignals/00new/propSignals/libs/propSignals.so':
/home/boniface/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-propSignals/00new/propSignals/libs/propSignals.so: undefined symbol: _Z15do_linear_decayN4Rcpp6VectorILi14ENS_15PreserveStorageEEEii
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/boniface/R/x86_64-pc-linux-gnu-library/3.6/propSignals’
I tried the following approaches and they didnt work:
R: Error in dyn.load(file, DLLpath = DLLpath, ...)
libgsl.so.25: cannot open shared object file: No such file or directory
More information:
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 LC_MONETARY=en_CA.UTF-8
[6] LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.4.2 usethis_2.0.1
loaded via a namespace (and not attached):
[1] rstudioapi_0.13 magrittr_2.0.1 pkgload_1.2.2 R6_2.5.1 rlang_0.4.11 fastmap_1.1.0 fansi_0.5.0
[8] tools_3.6.3 pkgbuild_1.2.0 sessioninfo_1.1.1 utf8_1.2.2 cli_3.0.1 withr_2.4.2 ellipsis_0.3.2
[15] remotes_2.4.1 rprojroot_2.0.2 tibble_3.1.5 lifecycle_1.0.1 crayon_1.4.1 processx_3.5.2 purrr_0.3.4
[22] callr_3.7.0 vctrs_0.3.8 fs_1.5.0 ps_1.6.0 testthat_3.0.4 memoise_2.0.0 glue_1.4.2
[29] cachem_1.0.6 pillar_1.6.3 compiler_3.6.3 desc_1.4.0 prettyunits_1.1.1 pkgconfig_2.0.3
What should I do? I spent so much time trying to fix this and it didnt go anywhere. I would really appreciate if someone can help me with this.

Related

Unable to load data stored with pins on rstudio connect #622

I'm currently working with the package pins. I am an RSW user with the following configuration:
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
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=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached are base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pins_1.0.1 yaml_2.3.5
loaded via a namespace (and not attached):
[1] fansi_1.0.3 digest_0.6.29 utf8_1.2.2 crayon_1.5.1 rappdirs_0.3.3 R6_2.5.1
[7] jsonlite_1.8.0 lifecycle_1.0.1 magrittr_2.0.3 httr_1.4.3 pillar_1.7.0 rlang_1.0.2
[13] cli_3.3.0 curl_4.3.2 rstudioapi_0.13 fs_1.5.2 vctrs_0.4.1 ellipsis_0.3.2
[19] tools_4.1.3 glue_1.6.2 rsconnect_0.8.26 compiler_4.1.3 askpass_1.1 pkgconfig_2.0.3
[25] openssl_2.0.2 tibble_3.1.7
I managed to push datasets on R Studio connect with pins.
Now I'd like to use one of that datasets on RSW. I am able to connect on RsStudio connect with the command:
board_rsconnect()
However, when I tried to load one of the datasets by using:
pin_read(board, "earth2")
It doesn't load the data. Instead, there is the following message:
Error in yaml.load(string, error.label = error.label, ...) :
(~/.cache/pins/rsc-e62371cfd77db754024f9c5ed3556a73/51ca356e-619e-4148-b12f-35e3e652d14d/79/data.txt) Scanner error: mapping values are not allowed in this context at line 36, column 20955
In addition: Warning message:
In readLines(file, warn = readLines.warn) :
incomplete final line found on '~/.cache/pins/rsc-e62371cfd77db754024f9c5ed3556a73/51ca356e-619e-4148-b12f-35e3e652d14d/79/data.txt'
By searching similar issues, someone has achieved to load it by deleting the data.txt file but it failed for me. https://github.com/rstudio/pins/issues/463
Do you know where the error came from?

Loading the package('kableExtra')

I'm a new user to rmarkdown and trying to learn how to format better tables for a report.
I had a report using the package "kableExtra" and it was fine. But now I cannot even load the package anymore and I do not know why.
This is the error I get:
"package of namespace load failed for 'kableExtra' in
library.dynam(lib, package, package.lib): DLL 'systemfonts' not
found: maybe not installed for this architecture? Execution halted"
Anyone can help me, please?
I am using RStudio 2022.02.0 Build 443
and R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Thank you :)
sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build
19042)
Matrix products: default
locale: [1] LC_COLLATE=English_Canada.1252
LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
LC_NUMERIC=C [5] LC_TIME=English_Canada.1252
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] dplyr_1.0.8
loaded via a namespace (and not attached): [1] pillar_1.7.0
compiler_4.1.2 remotes_2.4.2 prettyunits_1.1.1 tools_4.1.2
testthat_3.1.2 digest_0.6.29 [8] pkgbuild_1.3.1
pkgload_1.2.4 evaluate_0.15 memoise_2.0.1 lifecycle_1.0.1
tibble_3.1.6 pkgconfig_2.0.3 [15] rlang_1.0.2 DBI_1.1.2
cli_3.2.0 rstudioapi_0.13 curl_4.3.2 yaml_2.3.5
xfun_0.30 [22] fastmap_1.1.0 withr_2.5.0 knitr_1.38
desc_1.4.1 generics_0.1.2 vctrs_0.3.8 fs_1.5.2
[29] devtools_2.4.3 rprojroot_2.0.2 tidyselect_1.1.2 glue_1.6.2
R6_2.5.1 processx_3.5.2 fansi_1.0.2 [36]
rmarkdown_2.13 sessioninfo_1.2.2 purrr_0.3.4 callr_3.7.0
magrittr_2.0.2 usethis_2.1.5 ps_1.6.0 [43]
ellipsis_0.3.2 htmltools_0.5.2 assertthat_0.2.1 utf8_1.2.2
cachem_1.0.6 crayon_1.5.1 brio_1.1.3

blogdown: 'system3' is not an exported object from 'namespace:xfun'

On Windows 10, I am getting the following error with blogdown::new_site() function:
Hugo has been installed to "C:\Users\hp\AppData\Roaming\Hugo\0.89.4".
You are recommended to set options(blogdown.hugo.version = "0.89.4")
in the .Rprofile file in your website project. See the blogdown book
for more info on .Rprofile:
https://bookdown.org/yihui/blogdown/global-options.html
Error: 'system3' is not an exported object from 'namespace:xfun'
I'm wondering what am I missing here? Any hints.
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
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] xfun_0.28
loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2 blogdown_1.6.5 pacman_0.5.1
I don't know how you managed to install the dev version of blogdown without installing the dev version of xfun at the same time, since the latter is required (as specified in DESCRIPTION). Per installation instruction in README, this is how you install the dev version of blogdown:
remotes::install_github('rstudio/blogdown')
And the dev version of xfun should be installed automatically (note that you will need RTools).
FYI I get the exact same error trying to following the TL;DR section of this blog and that is after explicitly updating the xfun package. Here is the entire code segment I am trying to run:
remotes::install_github("rstudio/blogdown")
usethis::create_project()
blogdown::new_site(theme = "wowchemy/starter-academic")
and here is the error I am getting:
09:14:26 > blogdown::new_site(theme = "wowchemy/starter-academic")
― Creating your new site
| Installing Hugo
The latest Hugo version is v0.90.1
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.90.1/hugo_extended_0.90.1_macOS-ARM64.tar.gz'
Content type 'application/octet-stream' length 16102460 bytes (15.4 MB)
==================================================
downloaded 15.4 MB
Hugo has been installed to "/Users/rogerbos/Library/Application Support/Hugo/0.90.1".
Error: 'system3' is not an exported object from 'namespace:xfun'
09:14:26 >
and here is my sessionInfo():
9:14:26 > sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.0.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/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] datasets utils stats graphics grDevices methods base
other attached packages:
[1] alphavantager_0.1.2 googlesheets4_1.0.0 googledrive_2.0.0
[4] clipr_0.7.1 jsonlite_1.7.2 stringi_1.7.6
[7] dtplyr_1.1.0 data.table_1.14.2 dplyr_1.0.7
[10] plyr_1.8.6 testthat_3.1.0 lubridate_1.8.0
[13] timeDate_3043.102 sendmailR_1.2-1 rmarkdown_2.11
[16] devtools_2.4.2 usethis_2.1.3 xts_0.12.1
[19] zoo_1.8-9 MASS_7.3-54 fortunes_1.5-4
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 lattice_0.20-45 prettyunits_1.1.1
[4] ps_1.6.0 assertthat_0.2.1 rprojroot_2.0.2
[7] digest_0.6.29 utf8_1.2.2 R6_2.5.1
[10] cellranger_1.1.0 evaluate_0.14 blogdown_1.6.5
[13] httr_1.4.2 pillar_1.6.4 rlang_0.4.12
[16] curl_4.3.2 rstudioapi_0.13 callr_3.7.0
[19] desc_1.4.0 compiler_4.1.2 xfun_0.28
[22] pkgconfig_2.0.3 askpass_1.1 base64enc_0.1-3
[25] pkgbuild_1.2.0 htmltools_0.5.2 openssl_1.4.5
[28] tidyselect_1.1.1 tibble_3.1.5 bookdown_0.24
[31] fansi_0.5.0 crayon_1.4.2 withr_2.4.2
[34] rappdirs_0.3.3 grid_4.1.2 lifecycle_1.0.1
[37] DBI_1.1.1 magrittr_2.0.1 cli_3.1.0
[40] cachem_1.0.6 fs_1.5.0 remotes_2.4.1
[43] ellipsis_0.3.2 vctrs_0.3.8 generics_0.1.1
[46] tools_4.1.2 glue_1.5.1 purrr_0.3.4
[49] processx_3.5.2 pkgload_1.2.3 fastmap_1.1.0
[52] gargle_1.2.0 sessioninfo_1.2.1 memoise_2.0.0
[55] knitr_1.36

How can I solve my problems with the installation of the text2vec package?

I'm trying to install the R package text2vec, I get the following error.
It says it cannot open a certain shared object file.
> install.packages("text2vec")
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/var/R/library/rsparse/libs/rsparse.so':
float.so: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘text2vec’
* removing ‘/var/R/library/text2vec’
Warning in install.packages :
installation of package ‘text2vec’ had non-zero exit status
This is my session info:
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so
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
other attached packages:
[1] readr_1.4.0 usethis_2.0.1 purrr_0.3.4 rebus_0.1-3 testthat_3.0.3 stringi_1.6.2 scales_1.1.1
[8] tictoc_1.0.1 ggplot2_3.3.3 topicmodels_0.2-12 udpipe_0.8.6 tidytext_0.3.1 tidyr_1.1.3 stringr_1.4.0
[15] dplyr_1.0.5 odbc_1.3.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 lubridate_1.7.10 lattice_0.20-41 assertthat_0.2.1 utf8_1.2.1 slam_0.1-48
[7] plyr_1.8.6 cellranger_1.1.0 R6_2.5.0 stats4_4.0.3 quanteda_3.1.0 pillar_1.5.1
[13] cld3_1.4.1 rlang_0.4.10 readxl_1.3.1 rstudioapi_0.13 data.table_1.14.0 blob_1.2.1
[19] Matrix_1.2-18 rebus.base_0.0-3 config_0.3.1 bit_4.0.4 munsell_0.5.0 compiler_4.0.3
[25] janeaustenr_0.1.5 xfun_0.24 pkgconfig_2.0.3 tidyselect_1.1.0 tibble_3.1.0 rebus.numbers_0.0-1
[31] fansi_0.4.2 crayon_1.4.1 dbplyr_2.1.1 withr_2.4.1 SnowballC_0.7.0 grid_4.0.3
[37] gtable_0.3.0 lifecycle_1.0.0 DBI_1.1.1 magrittr_2.0.1 tokenizers_0.2.1 RcppParallel_5.1.4
[43] cli_2.4.0 reshape2_1.4.4 fs_1.5.0 NLP_0.2-1 xml2_1.3.2 stopwords_2.2
[49] ellipsis_0.3.1 generics_0.1.0 vctrs_0.3.7 fastmatch_1.1-3 wordcloud_2.6 RColorBrewer_1.1-2
[55] tools_4.0.3 bit64_4.0.5 glue_1.4.2 rebus.unicode_0.0-2 hms_1.0.0 rebus.datetimes_0.0-1
[61] parallel_4.0.3 yaml_2.2.1 tm_0.7-8 colorspace_2.0-0 knitr_1.33 modeltools_0.2-23
Can someone help me?
The problem here is the float package and the way R installs dependencies when not using "staged installs". What you can do here is to first reinstall the float package, and once it is reinstalled, reinstall the rsparse package. If that still doesn't work - and this is specific to float which uses dynamic linking - perhaps try installing float manually, changing the configuration to ensure that it uses your currently installed BLAS library (here openblas).

devtools::install_github Error: Failed to install 'unknown package' from GitHub

I got error from installing R packages using devtools::install_github
> devtools::install_github('cole-trapnell-lab/leidenbase')
Error: Failed to install 'unknown package' from GitHub:
SSL certificate problem: self signed certificate in certificate chain
I tried a solution posted here
library(httr)
set_config( config( ssl_verifypeer = 0L ) )
But still got the same error. Any suggestions?
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
Matrix products: default
BLAS/LAPACK: /mounts/anaconda3/envs/r-4.0.3/lib/libopenblasp-r0.3.12.so
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=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] httr_1.4.2 knitr_1.30 nvimcom_0.9-105
loaded via a namespace (and not attached):
[1] magrittr_2.0.1 usethis_2.0.0 devtools_2.3.2 pkgload_1.1.0 R6_2.5.0
[6] rlang_0.4.10 fansi_0.4.1 tools_4.0.3 pkgbuild_1.2.0 xfun_0.19
[11] sessioninfo_1.1.1 cli_2.2.0 withr_2.3.0 ellipsis_0.3.1 remotes_2.2.0
[16] assertthat_0.2.1 digest_0.6.27 rprojroot_2.0.2 lifecycle_0.2.0 crayon_1.3.4
[21] processx_3.4.5 purrr_0.3.4 callr_3.5.1 fs_1.5.0 ps_1.5.0
[26] curl_4.3 testthat_3.0.1 memoise_1.1.0 glue_1.4.2 compiler_4.0.3
[31] desc_1.2.0 prettyunits_1.1.1
I don't get the ssl error when I run your code, but you could try installing the leidenbase package using remotes::install_github():
#install.packages("remotes")
library(remotes)
install_github('cole-trapnell-lab/leidenbase')
Also it might be worth loading openssl through anaconda, e.g. conda install openssl (might help).

Resources