【问题标题】:Error 404 installing R package from public github repro从公共 github repro 安装 R 包时出现错误 404
【发布时间】:2021-12-15 13:37:56
【问题描述】:

我正在尝试从 github (https://github.com/KTMD-plant/gaRdenbox) 安装 gaRdenbox 包

但是当我跑步时

install_github("KTMD-plant/gaRdenbox")

返回

错误:无法从 GitHub 安装“未知包”: HTTP 错误 404。 未找到 您是否正确拼写了 repo 所有者 (KTMD-plant) 和 repo 名称 (gaRdenbox)? - 如果拼写正确,请检查您是否具有访问 repo 所需的权限。

据我所知,repro 是公开的。你知道这里有什么问题吗?

【问题讨论】:

    标签: r github package


    【解决方案1】:

    这是包gaRdenbox 中的一个错误,因为文件DESCRIPTION 是“缺失”的,因为只有一个文件Description

    您可以通过分叉包并通过重命名来更改文件来测试它——我做了in this fork in my repo。现在我们可以按预期安装:

    edd@rob:/tmp$ installGithub.r eddelbuettel/gaRdenbox
    Using github PAT from envvar GITHUB_PAT
    Downloading GitHub repo eddelbuettel/gaRdenbox@HEAD
    
    ✔  checking for file ‘/tmp/remotes12841a2d0cc36c/eddelbuettel-gaRdenbox-fd41a57/DESCRIPTION’ ...
    ─  preparing ‘gaRdenbox’:
    ✔  checking DESCRIPTION meta-information
    ─  checking for LF line-endings in source and make files and shell scripts
    ─  checking for empty or unneeded directories
    ─  building ‘gaRdenbox_0.0.1.0.tar.gz’
       
    Installing package into ‘/usr/local/lib/R/site-library’
    (as ‘lib’ is unspecified)
    * installing *source* package ‘gaRdenbox’ ...
    ** using staged installation
    ** R
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
    * DONE (gaRdenbox)
    edd@rob:/tmp$ 
    

    (其中installGitHub.r 是我的littler 包中命令行的simple wrapper)。您可以忽略PAT 消息;由于其他原因,我的环境中有一个。

    我已经在上游仓库提交了PR

    【讨论】:

      猜你喜欢
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-16
      相关资源
      最近更新 更多