gpt4 book ai didi

r - 安装 R 包 Ubuntu 22.04.1 LTE 时的包 libcurl4-openssl-dev 问题

转载 作者:行者123 更新时间:2023-12-05 04:22:42 33 4
gpt4 key购买 nike

我在 Ubuntu 上安装了 libcurl4-openssl-dev 包:

sudo apt-get install libcurl4-openssl-dev

然后创建了一个新的 miniconda 环境环境,我在其中安装了旧版本的 R,并与我在“基本”环境中拥有的 R 版本相对应。

> 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

我想安装一个包列表,使用:

R -q -e "install.packages(c('devtools', 'glmnet', 'foreach', 'getopt', 'doParallel', 'vegan', 'data.table', 'ggplot2', 'AssocTests', 'optparse', 'tibble'), repos='http://cran.r-project.org')"

但是作为输出,我获得了某些软件包的某些依赖项不可用,并且未安装这些软件包。

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)

尝试使用 R 将它们一一安装

install.packages(*package*, dependencies=TRUE)

给了我输出:

------------------------- 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=...'
--------------------------------------------------------------------

我的问题是安装 R 包时找不到包 libcurl4-openssl-dev,我无法将它添加到 PATH。有没有人可以帮助我?谢谢。

最佳答案

这些是系统依赖项,不是 R 包。如果你真的想构建自己的包,那么在这种情况下你需要通过 apt 安装 libcurl4-openssl-dev

虽然在 Ubuntu 上通常推荐的是,不要自己构建软件包,而是按照 CRAN 中描述的那样将它们作为 ppa 获取。 .

关于r - 安装 R 包 Ubuntu 22.04.1 LTE 时的包 libcurl4-openssl-dev 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73896884/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com