【问题标题】:How to point R to the correct version of curl when upgrading from R 3.6 to R 4.0?从 R 3.6 升级到 R 4.0 时,如何将 R 指向正确版本的 curl?
【发布时间】:2021-06-14 03:02:06
【问题描述】:

注意,几个月前我也在 RStudio 社区中发布了这个问题,但没有解决方案 (https://community.rstudio.com/t/https-protocol-error-when-upgrading-from-r-3-6-to-r-4-0/88234/2)。

2018 年左右,我按照此处的说明在 CentOS 7 服务器上安装了带有 R 3.6.0 的 RStudio Server(免费版):(https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.98.507-admin-guide.pdf)

一切正常,没有任何问题。最近需要升级R的版本,按照这里的说明安装了R 4.0.0:(https://docs.rstudio.com/resources/install-r/)

安装后,在命令行或RStudio IDE中安装包时抛出以下错误:

Protocol "https" not supported or disabled in libcurl

我检查了返回的 libcurlVersion():

[1] "7.47.0"
attr(,"ssl_version")
[1] "none"
attr(,"libssh_version")
[1] ""
attr(,"protocols")
[1] "dict" "file" "ftp" "gopher" "http" "imap" "pop3" "rtsp"
[9] "smtp" "telnet" "tftp"

所以我可以看到协议中没有列出 https。计算机上有另一个版本的 curl (7.73.0)(位于 /usr/bin/curl),它的协议中确实列出了 https,所以我需要将 R 指向这个版本。如何将 R 指向这个版本的 curl?

如果我可以提供其他信息,请告诉我(不完全确定如何为这个做一个代表;))

【问题讨论】:

  • 这是一个有趣的问题。所以你用yum install来安装R?我想这可能是一个更普遍的问题,即yum 如何确定要链接的库。您可能会在 superuser.com 上获得更好的支持,因为我不确定它是否特定于 R。
  • 感谢反馈,我会试试超级用户!

标签: r curl https libcurl


【解决方案1】:

这里的主要问题是从预编译库安装 R 引起的。为了解决这个问题,我按照说明从源代码安装 R(当然将 curl 步骤中的 URL 更改为所需的 R 版本):

https://docs.rstudio.com/resources/install-r-source/

在“构建和安装 R”下运行编译步骤之前,我在终端中设置了 PKG_CONFIG_PATH=/usr/local/lib(这是我的 libcurl 7.73.0 的位置),然后按照其余的安装说明从在那里。

最后,我编辑了 rserver.conf 文件以指向新版本的 R,然后重新启动 RStudio Sever,一切正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-17
    • 2021-03-02
    • 2019-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-08
    相关资源
    最近更新 更多