Following is the error message generated whenever I try to install any packages:
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib: cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
package ‘shiny’ 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.2: cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/PACKAGES'
Good afternoon ,
I have a problem with install.packages , for example :
install.packages("caret")
Warning in install.packages :
unable to access index for repository cran.rstudio.com/src/contrib:
scheme not supported in URL 'cran.rstudio.com/src/contrib/PACKAGES'
Installing package into ‘C:/Users/Mouad/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository cran.rstudio.com/src/contrib:
scheme not supported in URL 'cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
package ‘caret’ is not available (for R version 3.5.0)
Warning in install.packages :
unable to access index for repository cran.rstudio.com/bin/windows/contrib/3.5:
scheme not supported in URL 'cran.rstudio.com/bin/windows/contrib/3.5/PACKAGES'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5/PACKAGES'
I tried without success :
options(repos='cran.rstudio.com/')
I think the source of pb is that Rtools isn´t properly installed :
Sys.which("make")
make
""
Thank you for help !
My university provides access to RStudio via VPN. I can access but I can't install packages I usually can install on my PC. I know it's broad question, but any ideas on what to do?
This is what I get when I try to install:
> install.packages("tm")
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
object 'status' not found
Installing package into ‘/sscc/home/w/wgm210/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
object 'status' not found
Warning in install.packages :
package ‘tm’ is not available (for R version 3.3.2)
> install.packages("tm", lib="/sscc/opt/R-3.3.2/lib64/R/library")
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
object 'status' not found
Warning in install.packages :
'lib = "/sscc/opt/R-3.3.2/lib64/R/library"' is not writable
Would you like to use a personal library instead? (y/n) y
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
object 'status' not found
Warning in install.packages :
package ‘tm’ is not available (for R version 3.3.2)
Ask your root user to make "/sscc/opt/R-3.3.2/lib64/R/library" path writable.
sudo chmod 777 /sscc/opt/R-3.3.2/lib64/R/library
I recently installed R Studio (Version 0.99.892) on a personal computer (windows 8) and am trying to install, among others, the following packages:
ggplot2;
dplyr;
rmarkdown;
tidyr.
Neither R nor R Studio is able to install any of these packages. Each time I attempt to install a package, I get the set of warnings I include at the bottom of this post.
I have used the install.packages command as well as the built-in package installation tool. I have tried several different mirrors.
I have tried a public university internet source, my own private internet source, and a phone tether. I have tried to connect through a VPN. I have added R Studio to my Windows Firewall exception list and have also completely disabled the Windows Firewall. I am running no other firewalls.
I have toggled the various connection options in the "Packages" tab in Global Options.
I can access the URLs in a browser.
Here are the warnings from R Studio:
> install.packages("devtools")
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository https://cran.fhcrc.org/src/contrib:
cannot open URL 'https://cran.fhcrc.org/src/contrib/PACKAGES'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Installing package into ‘C:/Users/Nikhailovich/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository https://cran.fhcrc.org/src/contrib:
cannot open URL 'https://cran.fhcrc.org/src/contrib/PACKAGES'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Warning in install.packages :
package ‘devtools’ is not available (for R version 3.2.3)
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository https://cran.fhcrc.org/bin/windows/contrib/3.2:
cannot open URL 'https://cran.fhcrc.org/bin/windows/contrib/3.2/PACKAGES'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2/PACKAGES'
Here are the warnings from R (3.2.3):
> install.packages("ggplot2")
Installing package into ‘C:/Users/Nikhailovich/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) :
cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'
In addition: Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning: unable to access index for repository https://dirichlet.mat.puc.cl/src/contrib:
cannot open URL 'https://dirichlet.mat.puc.cl/src/contrib/PACKAGES'
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Warning: unable to access index for repository https://dirichlet.mat.puc.cl/bin/windows/contrib/3.2:
cannot open URL 'https://dirichlet.mat.puc.cl/bin/windows/contrib/3.2/PACKAGES'
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.2/PACKAGES'
Warning message:
package ‘ggplot2’ is not available (for R version 3.2.3)
There are several stackexchange posts on package installation in R and R Studio, but I was not able to find any that answered my particular situation. Thanks in advance to anyone that knows what's going on
Run this command:
options(repos="https://CRAN.R-project.org")
after that try install.packages;it should work.Tested on my system.
This has happened to me before. Try explicitly specifying the location:
install.packages("devtools", repos="https://cran.rstudio.com/")
You can indeed specify the location when using the install.packages() function with the argument repos=, but you can also choose your favorite repository which will be used each time you download a package.
options(repos="my_favorite_CRAN_mirror")
You can see a list of all availables mirrors on the CRAN website. Juste copy/paste the adress of the closest CRAN repository to you.
You should be able after this step to retry install.packages('ggplot2')
You should try following code:
install.packages("ggbiplot",dependencies = TRUE, repos = 'http://cran.rstudio.com/')
It will help you to install the packages for the error:
package is not available for this version
Run the following command in R terminal-
options(repos="https://CRAN.R-project.org")
then-
use-install.packages('library')
I want to add that I had this issue, but the fix was not in R, but in our system. Our IT guy said: For some unknown reason, the DNS resolver service was unable to resolve hostnames. I’ve restarted the resolvd service. The server can now resolve hostnames.
The error on his end was: Temporary failure in name resolution
I was having a similar error while trying to install the packages dplyr, tidyr packages.
I solved the issue by checking my R.version and downloading a new version of base R. (3.3.3)
Try this...
Tools-->Global Option--> Package
Change "Primary CRAN Repository" to htpps Location
This method fixed my issue
Hi I am relatively new user of R. Installed R on win8. Now I am trying to install packages but i getting following error:
install.packages("C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz", repos = NULL, type = "source")
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.0
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.0
Warning in install.packages :
package ‘C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz’ is not available (for R version 3.0.1)
Installing package into ‘C:/Users/Owner/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
ERROR: dependency 'plyr' is not available for package 'pROC'
* removing 'C:/Users/Owner/Documents/R/win-library/3.0/pROC'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-30~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\Owner\Documents\R\win-library\3.0" "C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz’ had non-zero exit status
Installing the plyr package won't make a lot of difference since pROC is not supported for your R distribution.
Also since you use Rstudio you might find it easier to install packages via
Tools>Install Packages
and then set
Install from:
to
Repository(CRAN).
That way you don't have to manually download them.
As an alternative to pROC you can maybe use ROCR.
Also this might be of interest if you were planning to use pROC to calculate the area under the curve, anyway I'm digressing.
it would appear that the immediate problem is the fact that you are using forward slashes instead of backslashes, were you to change that it would look like this:
install.packages("C:\\Users\\Owner\\Downloads\\pROC_1.5.4.tar.gz", repos = NULL, type = "source")
Good luck!