简体   繁体   中英

RStudio crashing when installing package with install.packages

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

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

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

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

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’

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

And running

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

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?

Thank you very much!

Make sure that you can reach the Cran org site. It appears to have been down a lot of the day. I just got: "cran.r-project.org's server IP address could not be found."

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>

I can see that you're using R version 3.6 I would recommend downgrading to version 3.5.3 from https://cran.r-project.org/bin/windows/base/old/

I've also had some issues with other functions when using v3.6. Let me know if this helps.

Best, Mostafa Lotfi

If this is a work-related computer, I would check with your systems types. There may be something in your setup that prevents you from installing R on your own without their blessings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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