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

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).

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?

cannot install custom library in 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.

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).

R unable to find repository for package RODBC when deploying

When I deploy to shinyapps.io, it gives me an error:
Unable to find repository URL for package RODBC
So when I go to open the chart via URL, it doesn't show anything, because it was unable to connect to the connection I had and load the data into the data frames I had created.
Deploy information:
The package is installed and works normally, even I search the data in my database through it.
After I posted the question in the R (R Community Question) community, I ended up following the steps as directed by #nirgrahamuk, and the error no longer appears!
So I had to update the R version to the latest one, and it worked!
After having executed the commands in R he asked:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 rsconnect_0.8.16 tools_3.6.1 curl_4.3 jsonlite_1.6.1
[6] digest_0.6.25 openssl_1.4.1 askpass_1.1
After updating the R version:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reshape2_1.4.4 lubridate_1.7.9 dplyr_1.0.0 DBI_1.1.0 RODBC_1.3-17 timevis_0.5
[7] shiny_1.5.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 compiler_4.0.2 pillar_1.4.4 later_1.1.0.1 plyr_1.8.6
[6] tools_4.0.2 digest_0.6.25 evaluate_0.14 jsonlite_1.6.1 lifecycle_0.2.0
[11] tibble_3.0.1 pkgconfig_2.0.3 rlang_0.4.6 cli_2.0.2 rstudioapi_0.11
[16] yaml_2.2.1 curl_4.3 xfun_0.15 fastmap_1.0.1 withr_2.2.0
[21] knitr_1.29 stringr_1.4.0 htmlwidgets_1.5.1 generics_0.0.2 vctrs_0.3.1
[26] askpass_1.1 tidyselect_1.1.0 glue_1.4.1 R6_2.4.1 fansi_0.4.1
[31] rmarkdown_2.3 purrr_0.3.4 magrittr_1.5 promises_1.1.1 htmltools_0.5.0
[36] ellipsis_0.3.1 assertthat_0.2.1 rsconnect_0.8.16 mime_0.9 xtable_1.8-4
[41] httpuv_1.5.4 stringi_1.4.6 openssl_1.4.1 crayon_1.3.4
So the version has been updated from R version 3.6.1 (2019-7-05) to R version 4.0.2 (2020-06-22).
And the error no longer appears:

Error on shiny server ERROR: 'restoreInput' is not an exported object from 'namespace:shiny'

I'm trying to run a shiny app that works perfectly well when I run it locally but not when I try and run it on a shiny web server. When I try and access it through the browser all I get is the following error message:
ERROR: 'restoreInput' is not an exported object from 'namespace:shiny'
I'm aware that a question regarding this error message has previously been asked here: Shinydashboard: 'restoreInput' is not an exported object from 'namespace:shiny' but I believe that person was running the app locally so my question is distinct from their's. Nevertheless I have obviously tried to implement all of the solutions provided for that answer which are basically just "ensure you have the latest version of R and the latest version of the required packages". I've done this and when I ssh into the shiny server and source my ui and server scripts and then call sessionInfo() this is the output:
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shinydashboard_0.6.1 shinythemes_1.1.1 ggplot2_2.2.1
[4] raster_2.6-7 sp_1.2-7 leaflet_1.1.0
[7] shiny_1.0.5
loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 magrittr_1.5 munsell_0.4.3 colorspace_1.3-2
[5] xtable_1.8-2 lattice_0.20-35 R6_2.2.2 rlang_0.2.0
[9] plyr_1.8.4 grid_3.4.3 gtable_0.2.0 htmltools_0.3.6
[13] crosstalk_1.0.0 yaml_2.1.17 lazyeval_0.2.1 digest_0.6.15
[17] tibble_1.4.2 htmlwidgets_1.0 mime_0.5 compiler_3.4.3
[21] pillar_1.2.1 scales_0.5.0 httpuv_1.3.6.1
which is almost identical to the output I get when I call sessionInfo() in my local version of R in which the app runs seamlessly. See below:
> sessionInfo()
R version 3.4.3 (2017-11-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 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
other attached packages:
[1] shinydashboard_0.6.1 shinythemes_1.1.1 ggplot2_2.2.1 raster_2.6-7
[5] sp_1.2-6 leaflet_1.1.0 shiny_1.0.5
loaded via a namespace (and not attached):
[1] Rcpp_0.12.14 magrittr_1.5 munsell_0.4.3 colorspace_1.3-2 xtable_1.8-2
[6] lattice_0.20-35 R6_2.2.2 rlang_0.1.2 plyr_1.8.4 tools_3.4.3
[11] rgdal_1.2-16 grid_3.4.3 gtable_0.2.0 rgeos_0.3-26 htmltools_0.3.6
[16] crosstalk_1.0.0 yaml_2.1.14 lazyeval_0.2.1 digest_0.6.14 tibble_1.3.4
[21] htmlwidgets_0.9 rsconnect_0.8.5 mime_0.5 compiler_3.4.3 scales_0.5.0
[26] jsonlite_1.5 httpuv_1.3.5
What's particularly strange is that initially when I ssh-ed into the shiny server and sourced the ui.R file I was getting this same error message. After updating R and all the packages this doesn't happen anymore but I still get the same error when I try and open the app in the browser. I added the following lines to the start of both my server and ui scripts to ensure that it was using the correct version of R and the up-to-date packages.
loc <- '/path/to/location/of/correct/r/packages'
.libPaths(c(loc, .libPaths()))
Can anybody advise me as to what might be going on or how best to troubleshoot?

Resources