In my windows 10 enviornment with latest version of R and RStudio, I am not able to download many of R packages like I mentioned, similarly R bioconductor package I am not being able to download,So whats the problem?
install.packages('GEOquery')
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/samer/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘GEOquery’ is not available (for R version 3.6.1)
install.packages('bioconductor')
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/samer/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘bioconductor’ is not available (for R version 3.6.1)
Update:
I downloaded and installed Rtools from the direct link instead from within the RStudio Environment.
Then I have following issues now.
BiocManager::install("GEOquery")
Bioconductor version 3.9 (BiocManager 1.30.7), R 3.6.1 (2019-07-05)
Installing package(s) 'BiocVersion', 'GEOquery'
also installing the dependencies ‘rlang’, ‘tidyselect’, ‘plogr’, ‘ellipsis’, ‘purrr’, ‘vctrs’, ‘lifecycle’, ‘Biobase’, ‘readr’, ‘xml2’, ‘dplyr’, ‘tidyr’, ‘limma’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rlang_0.4.0.zip'
Content type 'application/zip' length 1090422 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyselect_0.2.5.zip'
Content type 'application/zip' length 627063 bytes (612 KB)
downloaded 612 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/plogr_0.2.0.zip'
Content type 'application/zip' length 18873 bytes (18 KB)
downloaded 18 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/ellipsis_0.3.0.zip'
Content type 'application/zip' length 44553 bytes (43 KB)
downloaded 43 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/purrr_0.3.2.zip'
Content type 'application/zip' length 421098 bytes (411 KB)
downloaded 411 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/vctrs_0.2.0.zip'
Content type 'application/zip' length 828462 bytes (809 KB)
downloaded 809 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/lifecycle_0.1.0.zip'
Content type 'application/zip' length 84709 bytes (82 KB)
downloaded 82 KB
trying URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/Biobase_2.44.0.zip'
Content type 'application/zip' length 2421976 bytes (2.3 MB)
downloaded 2.3 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/readr_1.3.1.zip'
Content type 'application/zip' length 1589745 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xml2_1.2.2.zip'
Content type 'application/zip' length 3503035 bytes (3.3 MB)
downloaded 3.3 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/dplyr_0.8.3.zip'
Content type 'application/zip' length 3265027 bytes (3.1 MB)
downloaded 764 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyr_1.0.0.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyr_1.0.0.zip'
In addition: Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
downloaded length 782336 != reported length 3265027
2: In download.file(url, destfile, method, mode = "wb", ...) :
InternetOpenUrl failed: 'The server returned an invalid or unrecognized response'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘tidyr’ failed
trying URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/limma_3.40.6.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/limma_3.40.6.zip'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
InternetOpenUrl failed: 'The operation timed out'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘limma’ failed
trying URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/BiocVersion_3.9.0.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/BiocVersion_3.9.0.zip'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
InternetOpenUrl failed: 'The operation timed out'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘BiocVersion’ failed
trying URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/GEOquery_2.52.0.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://bioconductor.org/packages/3.9/bioc/bin/windows/contrib/3.6/GEOquery_2.52.0.zip'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
InternetOpenUrl failed: 'The operation timed out'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘GEOquery’ failed
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘plogr’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘lifecycle’ successfully unpacked and MD5 sums checked
package ‘Biobase’ successfully unpacked and MD5 sums checked
package ‘readr’ successfully unpacked and MD5 sums checked
package ‘xml2’ successfully unpacked and MD5 sums checked
Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open compressed file 'dplyr/DESCRIPTION', probable reason 'No such file or directory'
To install bioconductor packages is not like normal R packages. To do so, follow the steps here:
Example Code:
source("https://bioconductor.org/biocLite.R")
BiocInstaller::biocLite(c("GEOquery"))
To install Rtools get the latest download from here and install it, then re-try the code.
Edit:
Apparently there are updated installation practices, so the correct code should be:
BiocManager::install("GEOquery")
Related
OS: Ubuntu 17.1
I have tried to install plotly on R studio using install.packages("plotly")
It failed with the following log:
Installing package into ‘/home/company/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘htmlwidgets’, ‘hexbin’, ‘crosstalk’, ‘data.table’
trying URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz'
Warning in install.packages :
cannot open URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz'
Warning in install.packages :
download of package ‘htmlwidgets’ failed
trying URL 'https://cloud.r-project.org/src/contrib/hexbin_1.27.2.tar.gz'
Content type 'application/x-gzip' length 491560 bytes (480 KB)
==================================================
downloaded 480 KB
trying URL 'https://cloud.r-project.org/src/contrib/crosstalk_1.0.0.tar.gz'
Content type 'application/x-gzip' length 563474 bytes (550 KB)
==================================================
downloaded 550 KB
trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.10.4-3.tar.gz'
Content type 'application/x-gzip' length 3071833 bytes (2.9 MB)
==================================================
downloaded 2.9 MB
trying URL 'https://cloud.r-project.org/src/contrib/plotly_4.7.1.tar.gz'
Content type 'application/x-gzip' length 1034951 bytes (1010 KB)
==================================================
downloaded 1010 KB
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘hexbin’ had non-zero exit status
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘crosstalk’ had non-zero exit status
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘plotly’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpTFlAaE/downloaded_packages’
For some reason it can't allocate memory but in R it succeeds?
What is wrong here? Please advise why can't I install it straight forward?
You should try to install the development version of plotly (on GitHub) via devtools:
devtools::install_github("ropensci/plotly")
I'm having issues on loading the rworldmap with an error of fields. I found a post with the same error, however, the resolution did not work. In addition, my R version is R version 3.4.3 (2017-11-30)
Package (rworldmap) can not be loaded in R software
> install.packages("rworldmap", dependencies = TRUE )
Installing package into ‘C:/Users/johnw/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘e1071’, ‘fields’, ‘rgdal’,
‘rworldxtra’, ‘classInt’
There is a binary version available but the source version is later:
binary source needs_compilation
fields 9.0 9.6 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/e1071_1.6-
8.zip'
Content type 'application/zip' length 894561 bytes (873 KB)
downloaded 873 KB
trying URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/fields_9.0.zip'
Warning in install.packages :
cannot open URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/fields_9.0.zip': HTTP
status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/fields_9.0.zip'
Warning in install.packages :
download of package ‘fields’ failed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rgdal_1.2-
16.zip'
Content type 'application/zip' length 30479400 bytes (29.1 MB)
downloaded 29.1 MB
trying URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/rworldxtra_1.01.zip'
Content type 'application/zip' length 5273807 bytes (5.0 MB)
downloaded 5.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/classInt_0.1-
24.zip'
Content type 'application/zip' length 60087 bytes (58 KB)
downloaded 58 KB
trying URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/rworldmap_1.3-6.zip'
Content type 'application/zip' length 2872574 bytes (2.7 MB)
downloaded 2.7 MB
package ‘e1071’ successfully unpacked and MD5 sums checked
package ‘rgdal’ successfully unpacked and MD5 sums checked
package ‘rworldxtra’ successfully unpacked and MD5 sums checked
package ‘classInt’ successfully unpacked and MD5 sums checked
package ‘rworldmap’ successfully unpacked and MD5 sums checked
Even when trying to directly load the field package, I receive the below error:
> install.packages("fields")
Installing package into ‘C:/Users/johnw/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
fields 9.0 9.6 TRUE
Binaries will be installed
trying URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/fields_9.0.zip'
Warning in install.packages :
cannot open URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/fields_9.0.zip': HTTP
status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL
'https://cran.rstudio.com/bin/windows/contrib/3.4/fields_9.0.zip'
Warning in install.packages :
download of package ‘fields’ failed
Any help would be appreciated. Thanks
I've seen this: How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
and been through the list. No luck. I've also navigated via SSH to my library to see if there was some LOCK file or corrupt install. There is nothing there.
I literally just installed RStudio on Amazon EC2 and can't install the any new packages.
I've done it this way: https://aws.amazon.com/blogs/big-data/running-r-on-aws/
I've also used Ubuntu with Louis Anslett's AMI: http://www.louisaslett.com/RStudio_AMI/
I get the same problem in both. I have downloaded them manually and installed the tar.gz files from the temp directory. The CRAN repository seems to be fine because install.packages() downloads the tar.gz to /tmp/Rtmp2Rh9Zr/downloaded_packages/ just fine, but then the actual install process fails.
When I run install.packages("haven") for instance, it says
> install.packages("haven")
Installing package into ‘/home/jblocher/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘R6’, ‘assertthat’, ‘rlang’, ‘Rcpp’, ‘readr’, ‘hms’, ‘tibble’, ‘BH’
trying URL 'https://cran.rstudio.com/src/contrib/R6_2.2.1.tar.gz'
Content type 'application/x-gzip' length 325641 bytes (318 KB)
==================================================
downloaded 318 KB
trying URL 'https://cran.rstudio.com/src/contrib/assertthat_0.2.0.tar.gz'
Content type 'application/x-gzip' length 11612 bytes (11 KB)
==================================================
downloaded 11 KB
trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.1.1.tar.gz'
Content type 'application/x-gzip' length 201419 bytes (196 KB)
==================================================
downloaded 196 KB
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_0.12.11.tar.gz'
Content type 'application/x-gzip' length 2485092 bytes (2.4 MB)
==================================================
downloaded 2.4 MB
trying URL 'https://cran.rstudio.com/src/contrib/readr_1.1.1.tar.gz'
Content type 'application/x-gzip' length 233793 bytes (228 KB)
==================================================
downloaded 228 KB
trying URL 'https://cran.rstudio.com/src/contrib/hms_0.3.tar.gz'
Content type 'application/x-gzip' length 7271 bytes
==================================================
downloaded 7271 bytes
trying URL 'https://cran.rstudio.com/src/contrib/tibble_1.3.1.tar.gz'
Content type 'application/x-gzip' length 91235 bytes (89 KB)
==================================================
downloaded 89 KB
trying URL 'https://cran.rstudio.com/src/contrib/BH_1.62.0-1.tar.gz'
Content type 'application/x-gzip' length 10181096 bytes (9.7 MB)
==================================================
downloaded 9.7 MB
trying URL 'https://cran.rstudio.com/src/contrib/haven_1.0.0.tar.gz'
Content type 'application/x-gzip' length 150016 bytes (146 KB)
==================================================
downloaded 146 KB
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘R6’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘assertthat’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘BH’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘readr’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘haven’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpia0VEs/downloaded_packages’
When I install it using the already downloaded package, it says
> install.packages("/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz")
Installing package into ‘/home/jblocher/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz’ is not available (for R version 3.3.3)
If you are providing an archive file to install.packages you may need to specify repos=NULL:
install.packages("/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz", repos=NULL)
On my EC2 instance, I ran into the same problems when trying to install packages on RStudio, e.g., car, that involve RAM-intensive compilations. This could be fixed by adding swap space as described here
http://www.exegetic.biz/blog/2015/06/amazon-ec2-adding-swap/
I am unable to install ggplot2 package. I tried running below code.
install.packages("ggplot2")
also installing the dependencies ‘stringi’, ‘colorspace’, ‘Rcpp’, ‘stringr’, ‘munsell’, ‘plyr’, ‘digest’, ‘reshape2’, ‘scales’
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/stringi_1.0-1.zip'
Content type 'application/zip' length 14265659 bytes (13.6 MB)
downloaded 13.6 MB
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/colorspace_1.2-6.zip'
Content type 'application/zip' length 392857 bytes (383 KB)
downloaded 383 KB
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/Rcpp_0.12.2.zip'
Warning in install.packages :
InternetOpenUrl failed: 'The operation timed out'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/Rcpp_0.12.2.zip'
Warning in install.packages :
download of package ‘Rcpp’ failed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/stringr_1.0.0.zip'
Content type 'application/zip' length 83159 bytes (81 KB)
downloaded 81 KB
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/munsell_0.4.2.zip'
Content type 'application/zip' length 125762 bytes (122 KB)
downloaded 122 KB
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/plyr_1.8.3.zip'
Warning in install.packages :
InternetOpenUrl failed: 'The operation timed out'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/plyr_1.8.3.zip'
Warning in install.packages :
download of package ‘plyr’ failed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/digest_0.6.8.zip'
Content type 'application/zip' length 151939 bytes (148 KB)
downloaded 148 KB
trying URL
'http://cran.rstudio.com/bin/windows/contrib/3.2/reshape2_1.4.1.zip'
Warning in install.packages :
InternetOpenUrl failed: 'The operation timed out'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/reshape2_1.4.1.zip'
Warning in install.packages :
download of package ‘reshape2’ failed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/scales_0.3.0.zip'
Warning in install.packages :
InternetOpenUrl failed: 'The operation timed out'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/scales_0.3.0.zip'
Warning in install.packages :
download of package ‘scales’ failed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/ggplot2_1.0.1.zip'
Warning in install.packages :
InternetOpenUrl failed: 'The operation timed out'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/ggplot2_1.0.1.zip'
Warning in install.packages :
download of package ‘ggplot2’ failed
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘colorspace’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
I tried installing the plyr package individually but I got the same error
InternetOpenUrl failed: 'The operation timed out'
while installing the dependency package Rcpp and plyr also failed
Try and see if the following syntax works for you:
install.packages("ggplot2", dependencies = TRUE, repos = "http://cran.rstudio.com/")
Mirror names can be changed via "repos".
When I try the following command
install.packages('RMySQL',type='source')
I got an error as below
Installing into ‘C:/Users/Thanushiya/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://ftp.iitm.ac.in/cran/src/contrib/RMySQL_0.10.6.tar.gz'
Content type 'application/x-gzip' length 52407 bytes (51 KB)
downloaded 36 KB
Error in untar2(tarfile, files, list, exdir, restore_times) :
incomplete block on file
The downloaded source packages are in
‘C:\Users\Thanushiya\AppData\Local\Temp\RtmpSMF6pv\downloaded_packages’
Warning messages:
1: In download.file(url, destfile, method, mode = "wb", ...) :
downloaded length 36864 != reported length 52407
2: running command '"C:/PROGRA~1/R/R-32~1.2/bin/i386/R" CMD INSTALL -l "C:\Users\Thanushiya\Documents\R\win-library\3.2" C:\Users\THANUS~1\AppData\Local\Temp\RtmpSMF6pv/downloaded_packages/RMySQL_0.10.6.tar.gz' had status 1
3: In install.packages("RMySQL", type = "source") :
installation of package ‘RMySQL’ had non-zero exit status