簡體   English   中英

安裝 devtools package 失敗

[英]Installing devtools package fails

我正在嘗試安裝名為 devtools 的 package。 我運行命令: install.packages("devtools")install.packages("devtools",dependencies = TRUE) ,我得到同樣的錯誤:

Error: package or namespace load failed for ‘gert’:
 .onLoad failed in loadNamespace() for 'gert', details:
  call: NULL
  error: 'as_text' is not an exported object from 'namespace:sys'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/ab/usr/my_user/R/x86_64-pc-linux-gnu-library/3.5/gert’
Warning in install.packages :
  installation of package ‘gert’ had non-zero exit status
ERROR: dependency ‘gert’ is not available for package ‘usethis’
* removing ‘/ab/usr/my_user/R/x86_64-pc-linux-gnu-library/3.5/usethis’
Warning in install.packages :
  installation of package ‘usethis’ had non-zero exit status
ERROR: dependency ‘usethis’ is not available for package ‘devtools’
* removing ‘/ab/usr/my_user/R/x86_64-pc-linux-gnu-library/3.5/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpj3P5T5/downloaded_packages’

我試過運行install.packages("gert")並且我得到錯誤:

Error: package or namespace load failed for ‘gert’:
 .onLoad failed in loadNamespace() for 'gert', details:
  call: NULL
  error: 'as_text' is not an exported object from 'namespace:sys'
Error: loading failed
Execution halted

有人有想法么?

這是一些系統信息():

R 版本 3.5.2 (2018-12-20) 平台:x86_64-pc-linux-gnu (64-bit)

我查看了類似的問題,其中評論者/回答者建議關閉和打開 Rstudio 或重新啟動 R session。 我已經嘗試過這些並得到了同樣的錯誤。

將 R 更新到最新版本有效。

安裝 libgit2(如這里所建議的)對我有用。

還有一個 conda package 也適用,以防您沒有 sudo 權限。

暫無
暫無

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

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