I installed the package libcurl4-openssl-dev on Ubuntu with:
sudo apt-get install libcurl4-openssl-dev Then created a new miniconda environment environment where I installed an older version of R with repsect to the R version I have in the "base" environment.
> sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-conda_cos6-linux-gnu (64-bit) Running under: Ubuntu 22.04.1 LTS Matrix products: default BLAS/LAPACK: /home/studenti/miniconda3/envs/biobakery-melonnpan/lib/libopenblasp-r0.3.12.so 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 loaded via a namespace (and not attached): [1] compiler_3.6.1 I wanted to install a list of packages, using:
R -q -e "install.packages(c('devtools', 'glmnet', 'foreach', 'getopt', 'doParallel', 'vegan', 'data.table', 'ggplot2', 'AssocTests', 'optparse', 'tibble'), repos='http://cran.r-project.org')" But as an Output I obtained that some dependencies for some packages weren't available, and the packages were not installed.
ERROR: dependency ‘credentials’ is not available for package ‘gert’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/gert’ ERROR: dependency ‘httr’ is not available for package ‘gh’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/gh’ ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/ragg’ ERROR: dependency ‘fExtremes’ is not available for package ‘AssocTests’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/AssocTests’ ERROR: dependencies ‘curl’, ‘gert’, ‘gh’ are not available for package ‘usethis’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/usethis’ ERROR: dependencies ‘httr’, ‘ragg’ are not available for package ‘pkgdown’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/pkgdown’ ERROR: dependencies ‘usethis’, ‘pkgdown’, ‘rcmdcheck’, ‘rversions’, ‘urlchecker’ are not available for package ‘devtools’ removing ‘/home/studenti/miniconda3/envs/biobakery-melonnpan/lib/R/library/devtools’ The downloaded source packages are in ‘/tmp/Rtmp1XU3Vb/downloaded_packages’ Updating HTML index of packages in ‘.Library’ Making ‘packages.html’ … done There were 19 warnings (use warnings() to see them) Trying to install them one by one in R using
install.packages(*package*, dependencies=TRUE) has given me the output:
------------------------- ANTICONF ERROR --------------------------- Configuration failed because libcurl was not found. Try installing: * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc) * rpm: libcurl-devel (Fedora, CentOS, RHEL) * csw: libcurl_dev (Solaris) If libcurl is already installed, check that 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' -------------------------------------------------------------------- My problem here is that the package libcurl4-openssl-dev is not found when installing R packages and I can't add it to the PATH. Is there someone that could help me? Thank you.