簡體   English   中英

R devtools :: install_github()下載錯誤:未經授權

[英]R devtools::install_github() error in download: unauthorized

我正在嘗試將R綁定到Twitter,而我嘗試的一切都失敗了。 我一直在尋找幾個鏈接,包括以下內容:

雖然這些問題導致了更多問題,但我現在在這里這里查看鏈接,以嘗試一些解決方法。 我會將我的問題發布為對這些鏈接中任何一個的評論,但我沒有足夠的代表。

當我運行以下代碼時,出現以下錯誤

碼:

library(base64enc)
library(RCurl)
library(httr)
set_config( config( ssl_verifypeer = 0L ) )
devtools::install_github("jrowen/twitteR", user="MY_USERNAME", password="MY_PASSWORD", ref = "oauth_httr_1_0")

錯誤:

WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.3 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
Downloading GitHub repo jrowen/twitteR@oauth_httr_1_0
Error in download(dest, src, auth) : client error: (401) Unauthorized

我是否在這里完全缺少有關如何下載此dev twitteR軟件包的信息? 有誰知道如何克服401錯誤?

謝謝,

您是否在上面引用的會話中安裝了R工具並提供了源代碼? 您沒有收到證書錯誤(您以前曾來過嗎?),這表明您沒有正在運行的證書服務器,就像某些鏈接文章中的問題一樣。

我建議按照以下步驟查找您的問題。

您可能需要httpuv軟件包,該軟件包可通過以下來源下載

install.packages('httpuv')
library('httpuv')

有時,twitteR軟件包需要較舊版本的httr才能正常工作,具體取決於jrowen(和hadley)的更新。

您可以嘗試安裝舊版的httr

 devtools::install_version("httr", version="0.6.0", repos="http://cran.us.r-project.org")

然后重新啟動R,然后再次嘗試安裝。 請注意,如果您使用的是64位計算機,則可能必須先安裝httr的最新版本,然后再安裝較舊的版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM