本文介绍了使用install.packages安装软件包时RStudio崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在RStudio中安装软件包,但无法执行.未能安装包含我们的错误或警告的软件包.

I am trying to install packages in RStudio but just cannot do it. It has been failing to install packages withour errors or warnings.

我在早期安装texlive-full时遇到问题,并且可能对我的/etc/apt/sources.list.d文件做了些尴尬.我遇到以下问题:

I had a problem earlier on to install texlive-full earlier on, and might have done something awkward to my /etc/apt/sources.list.d files. I had the following problem:

install.packages('rstanarm')
Warning in install.packages :
  unable to access index for repository https://cloud.r-
project.org/src/contrib:
  cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES

哪个是在另一个stackoverflow线程中解决的:

Which was solved in another stackoverflow thread: Unable to install packages in latest version of RStudio and R Version.3.1.1

运行时: install.packages('rstanarm',依赖关系= T,,repos =' http://cran.rstudio.com/')

Upon running: install.packages('rstanarm', dependencies = T, , repos='http://cran.rstudio.com/')

R失败,并显示错误:

R fails with error:

ERROR: failed to lock directory ‘[...]/R/x86_64-pc-linux-gnu-
library/3.6’ for modifying
Try removing ‘[...]/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-
rstanarm’

再一次,我在stackoverflow中尝试了 R install.packages返回无法创建锁定目录"

Once again, in stackoverflow I tried R install.packages returns "failed to create lock directory"

正在运行

install.packages('rstanarm', dependencies = T, ,
repos='http://cran.rstudio.com/', INSTALL_opts = c('--no-lock'))

导致RStudio在安装过程中崩溃和关闭的原因.

Leads to RStudio crashing and closing in the middle of the installation.

其他程序包也会发生这种情况.我已经花了几个小时就此放弃了.任何人都知道会发生什么事吗?

This also happens for other packages. I have spent a few hours on this and on the brink of giving up. Anyone has an idea of what might be going on?

非常感谢!

推荐答案

r-project.org的名称服务器已关闭或暂时没有域名记录(在0426UTC,2019年6月27日):

The name servers for r-project.org are either down or have no records for the domain name for the moment (at 0426UTC, 27JUN2019):

<pre>

$ dig @ns2.wu-wien.ac.at r-project.org

; <<>> DiG 9.11.3-1ubuntu1.8-Ubuntu <<>> @ns2.wu-wien.ac.at r-project.org
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached


$ dig @ns6.gandi.net r-project.org

; <<>> DiG 9.11.3-1ubuntu1.8-Ubuntu <<>> @ns6.gandi.net r-project.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 52927
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;r-project.org.			IN	A

;; Query time: 347 msec
;; SERVER: 217.70.177.40#53(217.70.177.40)
;; WHEN: Thu Jun 27 14:24:08 AEST 2019
;; MSG SIZE  rcvd: 42


$ dig @ns1.wu-wien.ac.at r-project.org

; <<>> DiG 9.11.3-1ubuntu1.8-Ubuntu <<>> @ns1.wu-wien.ac.at r-project.org
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
</pre>

这篇关于使用install.packages安装软件包时RStudio崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 06:34