繁体   English   中英

R install_github:错误:无法安装“未知包”

[英]R install_github: Error: Failed to install 'unknown package'

我是 GitHub 的新手,我很困惑。 我无法让install_github工作。

我按照此处的有用说明设置了我的帐户: https : //kbroman.org/github_tutorial/pages/init.html 我有一个帐户和一个存储库,用于存储一些 R ggplot 设置: https : //github.com/tgraybam/TorontoPlot

好的。 现在我想将我的 repo 中的设置文件安装到 R 项目中,因此: devtools::install_github('tgraybam/TorontoPlot')

但是执行命令会返回错误:

Error: Failed to install 'unknown package' from GitHub: HTTP error
404. Not Found Did you spell the repo owner (`tgraybam`) and repo name (`TorontoPlot`) correctly? - If spelling is correct, check that you
have the required permissions to access the repo.

我有devtools安装。 我没有拼写错误。 这是我自己的回购。 我可以克隆它就好了:

git clone https://github.com/tgraybam/TorontoPlot.git

我可以将install_github与不同的存储库一起使用(这很好用: install_github("kbroman/broman") 。)

我可以认证。 ssh -T git@github.com返回

Hi tgraybam! You've successfully authenticated, but GitHub does not provide shell access.

就像它应该的那样。

我在谷歌上搜索了一场风暴并尝试了我能想到的一切(多次在多个订单中)。

我正在使用 Mac。 这是我的系统和 R 的详细信息:

platform       x86_64-apple-darwin15.6.0   
arch           x86_64                      
os             darwin15.6.0                
system         x86_64, darwin15.6.0        
status                                     
major          3                           
minor          5.2                         
year           2018                        
month          12                          
day            20                          
svn rev        75870                       
language       R                           
version.string R version 3.5.2 (2018-12-20)
nickname       Eggshell Igloo         

任何人都可以帮忙吗? 非常感谢。

我遇到了同样的问题,然后我使用了remotes::install_github()并从 R 会话中设置了Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")

参考:

https://github.com/r-lib/remotes

https://github.com/r-lib/remotes/issues/403

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM