gpt4 book ai didi

r - 软件包 ‘stringr’ 和 ‘stringi’ 的安装具有非零退出状态

转载 作者:行者123 更新时间:2023-12-02 06:16:52 28 4
gpt4 key购买 nike

请帮我在R中安装stringr和stringi包。结果是:

install.packages("stringi")
Installing package into ‘C:/Users/kozlovpy/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/bin/windows/contrib/3.2/stringi_0.5-5.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) :
не могу открыть URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/bin/windows/contrib/3.2/stringi_0.5-5.zip'
Вдобавок: Предупреждение:
В download.file(url, destfile, method, mode = "wb", ...) :
'InternetOpenUrl' не удалось: 'Операция прервана по таймауту'
Предупреждение в download.packages(pkgs, destdir = tmpd, available = available, :
скачивание пакета ‘stringi’ не удалось

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Russian_Russia.1251 LC_CTYPE=Russian_Russia.1251 LC_MONETARY=Russian_Russia.1251 LC_NUMERIC=C
[5] LC_TIME=Russian_Russia.1251

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] plyr_1.8.2 tools_3.2.2 gtable_0.1.2 Rcpp_0.11.5 grid_3.2.2 digest_0.6.8 proto_0.3-10

我尝试遵循链接 How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning? 中的建议,结果是下一个(不是正数):

  1. 名字可以
  2. 只需设置所有可能的存储库
  3. 包当然位于存储库中
  4. “stringr”当然是一个包
  5. 我的 R 还没有过时,我最近将其升级到了 3.2.0 版本
  6. “stringr”不是存档包
  7. 这没有给出积极的结果:

    install.packages("stringr", type = "source")
    Installing package into ‘C:/Users/kozlovpy/Documents/R/win-library/3.2’
    (as ‘lib’ is unspecified)
    also installing the dependency ‘stringi’

    пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/src/contrib/stringi_0.5-5.tar.gz '
    内容类型“application/octet-stream”长度 3639183 字节 (3.5 MB)
    下载 3.5 MB

    пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/src/contrib/stringr_1.0.0.tar.gz '
    内容类型“application/octet-stream”长度 34880 字节 (34 KB)
    下载 34 KB

    • 正在安装包“stringi”...
      ** пакет 'stringi' удачно распакован, MD5 sums проверены
      示例: работающая команда 'sh ./configure.win' имет статус 127
      错误:包“stringi”配置失败
    • 删除“C:/Users/kozlovpy/Documents/R/win-library/3.2/stringi”
      错误:依赖项“stringi”不适用于包“stringr”
    • 删除“C:/Users/kozlovpy/Documents/R/win-library/3.2/stringr”

    Скачанные исходники пакетов находятся в
    ‘C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4\downloaded_pa​​ckages’
    示例:
    1: работающая команда '"C:/PROGRA~1/RRO/R-32~1.2/bin/x64/R"
    CMD INSTALL -l "C:\Users\kozlovpy\Documents\R\win-library\3.2"
    C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4/downloaded_pa​​ckages/stringi_0.5-5.tar.gz' имеет статус 1
    2: B install.packages("stringr", type = "source") :
    установка пакета ‘stringi’ имеет ненулевой статус выхода
    3: работающая команда '"C:/PROGRA~1/RRO/R-32~1.2/bin/x64/R"
    CMD INSTALL -l "C:\Users\kozlovpy\Documents\R\win-library\3.2"
    C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4/downloaded_pa​​c
    kages/stringr_1.0.0.tar.gz' имеет статус 1
    4: B install.packages("stringr", type = "source") :
    установка пакета ‘stringr’ имеет ненулевой статус выхода

  8. Github 包显示以下内容:

    install_github("hadley/stringr")
    Downloading github repo hadley/stringr@master
    Ошибка в loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called ‘stringi’
    install_github("Rexamine/stringi")
    Downloading github repo Rexamine/stringi@master
    Ошибка в loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called ‘stringi’

  9. options(install.packages.check.source = "no") 也没有帮助

  10. 尝试输入不同的存储库 - 没有希望。

你猜我做错了什么吗?

最佳答案

先生,我尝试过:

install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
install.packages("stringr", dependencies=TRUE, INSTALL_opts = c('--no-lock'))

它对我有用,尝试一下!

关于r - 软件包 ‘stringr’ 和 ‘stringi’ 的安装具有非零退出状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34201742/

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