【问题标题】:rnaturalearthhires package installation errorrnaturalearthhires 包安装错误
【发布时间】:2021-05-23 10:00:32
【问题描述】:

我正在尝试安装 rnaturalearthhires 软件包,但我遇到了很多错误。

这是第一个错误:

Installing the rnaturalearthhires package.
Installing package into ‘C:/Users/kkost/OneDrive/Dokumenti/R/win-library/4.0’
(as ‘lib’ is unspecified)

值错误[3L]: 安装 rnaturalearthhires 包失败。 请尝试使用以下命令为自己安装软件包: install.packages("rnaturalearthhires", repos = http://packages.ropensci.org", type = "source")

然后我尝试以下代码:

install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", type = "source")

我明白了:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/kkost/OneDrive/Dokumenti/R/win-library/4.0’
(as ‘lib’ is unspecified)
**Error in install.packages : error reading from connection**

然后我试试这个代码:

devtools::install_github("ropensci/rnaturalearthhires")

但最终得到了这个:

loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) 中的错误: namespace ‘rlang’ 0.4.8 已经加载,但是 >= 0.4.10 是必需的

我也试试这个代码:

install_github("ropensci/rnaturalearthhires")

但我明白了:

install_github("ropensci/rnaturalearthhires") 中的错误: 找不到函数“install_github”

【问题讨论】:

    标签: r


    【解决方案1】:

    我发现了这个问题,它可能会有所帮助: https://github.com/ropensci/rnaturalearthhires/issues/2

    install.packages("devtools") # I guess you also need this
    devtools::install_github("ropensci/rnaturalearthhires")
    library("rnaturalearth")
    

    【讨论】:

      【解决方案2】:

      对于某些用户来说,devtools 可能需要很长时间才能编译和安装。现在可以使用 remotes 包直接从 github 安装。

      remotes::install_github("ropensci/rnaturalearthhires")

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-08-28
        • 2017-05-24
        • 2018-06-30
        • 1970-01-01
        • 1970-01-01
        • 2016-09-11
        • 2017-01-02
        相关资源
        最近更新 更多