[英]R devtools::install_github() error in download: unauthorized
[英]R devtools:install_github() - what does “Error: JSON: EXPECTED value GOT <” mean?
我正在嘗試使用devtools從GitHub安裝R包(就像我之前做過很多次一樣),但是出現以下錯誤:
devtools::install_github("rickhelmus/patRoon")
Error: JSON: EXPECTED value GOT <
In addition: Warning message:
In structure(xx, class = c("POSIXct", "POSIXt"), tzone = tz) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
它不取決於我要安裝的軟件包,不同的軟件包會出現相同的錯誤。
這個錯誤是什么意思? 以及如何解決?
我正在使用R Studio版本1.1.463和R 3.4.4。
謝謝! 安德里亞
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] httr_1.3.1 usethis_1.4.0 devtools_2.0.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rstudioapi_0.8 magrittr_1.5 pkgload_1.0.2 R6_2.3.0 rlang_0.3.0.1 tools_3.4.4
[8] pkgbuild_1.0.2 sessioninfo_1.1.1 cli_1.0.1 withr_2.1.2 remotes_2.0.2 yaml_2.1.19 assertthat_0.2.0
[15] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.0 callr_3.0.0 base64enc_0.1-3 fs_1.2.6
[22] ps_1.2.1 curl_3.2 testthat_2.0.1 glue_1.3.0 memoise_1.1.0 compiler_3.4.4 desc_1.2.0
[29] backports_1.1.2 prettyunits_1.0.2
沒有答案的Triage幫助
如注釋線程中所述,這看起來像您正在獲取HTML pae,這表明您與目的地之間存在中介(例如代理服務器),並且代理不知道如何處理請求(也許由於沒有身份驗證)。 我仍然不確定為什么這會影響您在家(除非您使用VPN或工作場所出於某種原因在家中維護代理服務器設置)。
您可以運行此命令(這是install_github()
最終執行的操作):
res <- httr::GET("https://github.com/rickhelmus/patRoon/archive/master.zip")
並且如果在打印res
時沒有得到這樣的信息:
res
## Response [https://codeload.github.com/rickhelmus/patRoon/zip/master]
## Date: 2018-12-05 14:11
## Status: 200
## Content-Type: application/zip
## Size: 10.5 MB
## <BINARY BODY>
當您在問題中的代碼塊上打印res
時,您可以發布您得到的結果嗎?
然后,我可以發布一些后續分類。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.