简体   繁体   中英

error when trying to install packages within Rstudio

I'm trying to install some packages within Rstudio on my windows computer but I encounter some problems. When I type in:

install.packages("dplyr") 

I get the following error:

Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Warning in install.packages :
  package ‘dplyr’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.0:
  internet routines cannot be loaded
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded

I've also tried to install packages in the following way:

> install.packages("C:/Users/NLFERM/Downloads/dplyr_1.0.4.tar.gz", repos = NULL, type = "source")

But here I also get an error:

ERROR: dependencies 'ellipsis', 'generics', 'glue', 'lifecycle', 'magrittr', 'R6', 'rlang', 'tibble', 'tidyselect', 'vctrs' are not available for package 'dplyr'
* removing 'C:/Users/NLFERM/Documents/R/R-4.0.4/library/dplyr'
Warning in install.packages :
  installation of package ‘C:/Users/NLFERM/Downloads/dplyr_1.0.4.tar.gz’ had non-zero exit status

I already reinstalled R studio and made sure that I have the newest version of R on my computer. Does anyone know how to fix this problem?

Kind regards

Does this work in your R base?

Otherwise are you connected to internet? Or over an enterprise network where cran websites are not accessible?

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