Issues installing dada2 in R v.4.2.1 - r

As the title states, I'm trying to install the dada2 library on R v. 4.2.1, for some upcoming eDNA analyses. However, when trying to run the following installation code:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("dada2", version = "3.15")
I get the following output:
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23
ucrt)
Old packages: 'brew', 'jsonlite', 'ragg', 'RCurl'
Update all/some/none? [a/s/n]:
When I update the old packages, I get the following output:
There are binary versions available but the source versions are
later:
binary source needs_compilation
jsonlite 1.8.1 1.8.2 TRUE
RCurl 1.98-1.8 1.98-1.9 TRUE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/brew_1.0-8.zip'
Content type 'application/zip' length 78734 bytes (76 KB)
downloaded 76 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/ragg_1.2.3.zip'
Content type 'application/zip' length 1300158 bytes (1.2 MB)
downloaded 1.2 MB
package ‘brew’ successfully unpacked and MD5 sums checked
package ‘ragg’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\robinc4\AppData\Local\Temp\RtmpwR2WRF\downloaded_packages
installing the source packages ‘jsonlite’, ‘RCurl’
trying URL 'https://cran.rstudio.com/src/contrib/jsonlite_1.8.2.tar.gz'
Content type 'application/x-gzip' length 1053090 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/src/contrib/RCurl_1.98-1.9.tar.gz'
Content type 'application/x-gzip' length 731611 bytes (714 KB)
downloaded 714 KB
The downloaded source packages are in
‘C:\Users\robinc4\AppData\Local\Temp\RtmpwR2WRF\downloaded_packages’
Warning messages:
1: package(s) not installed when version(s) same as current; use `force =
TRUE` to re-install: 'dada2'
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘jsonlite’ had non-zero exit status
3: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘RCurl’ had non-zero exit status
Afterwards, I tried this code:
install.packages("devtools")
library("devtools")
devtools::install_github("benjjneb/dada2", ref="v1.16") # change the ref argument to get other versions
And get following output:
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/devtools_2.4.4.zip'
Content type 'application/zip' length 429292 bytes (419 KB)
downloaded 419 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\robinc4\AppData\Local\Temp\RtmpwR2WRF\downloaded_packages
> library("devtools")
Loading required package: usethis
> devtools::install_github("benjjneb/dada2", ref="v1.16")
Downloading GitHub repo benjjneb/dada2#v1.16
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: RCurl (1.98-1.8 -> 1.98-1.9) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
I update all old packages, which gives me the following:
GenomeInf... (NA -> 1.2.8 ) [CRAN]
RCurl (1.98-1.8 -> 1.98-1.9) [CRAN]
Installing 2 packages: GenomeInfoDbData, RCurl
There is a binary version available but the source version is
later:
binary source needs_compilation
RCurl 1.98-1.8 1.98-1.9 TRUE
installing the source packages ‘GenomeInfoDbData’, ‘RCurl’
trying URL 'https://bioconductor.org/packages/3.15/data/annotation/src/contrib/GenomeInfoDbData_1.2.8.tar.gz'
Content type 'application/x-gzip' length 11512907 bytes (11.0 MB)
downloaded 11.0 MB
trying URL 'https://cran.rstudio.com/src/contrib/RCurl_1.98-1.9.tar.gz'
Content type 'application/x-gzip' length 731611 bytes (714 KB)
downloaded 714 KB
The downloaded source packages are in
‘C:\Users\robinc4\AppData\Local\Temp\RtmpwR2WRF\downloaded_packages’
Error: Failed to install 'dada2' from GitHub:
! System command 'Rcmd.exe' failed
In addition: Warning messages:
1: In i.p(...) :
installation of package ‘GenomeInfoDbData’ had non-zero exit status
2: In i.p(...) : installation of package ‘RCurl’ had non-zero exit status
I'm not sure what is going wrong here, and my colleagues aren't too sure either... Has anyone here had a similar issue?
Thanks a lot in advance!

Related

Error when installing "Diffbind" package in R

I was trying to install DiffBind package in R, but it reports to me some errors. Could anyone explain to me how to fix errors and installing properly it?
That's the message:
BiocManager::install("DiffBind")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cloud.r-project.org
Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.3 (2022-03-10)
Installing package(s) 'DiffBind'
si installano anche le dipendenze ‘RcppEigen’, ‘RcppNumerical’, ‘apeglm’
apertura URL 'https://cloud.r-project.org/src/contrib/RcppEigen_0.3.3.9.2.tar.gz'
Content type 'application/x-gzip' length 1476004 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
apertura URL 'https://cloud.r-project.org/src/contrib/RcppNumerical_0.4-0.tar.gz'
Content type 'application/x-gzip' length 143327 bytes (139 KB)
==================================================
downloaded 139 KB
apertura URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/apeglm_1.16.0.tar.gz'
Content type 'application/x-gzip' length 1092965 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
apertura URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/DiffBind_3.4.11.tar.gz'
Content type 'application/x-gzip' length 6762432 bytes (6.4 MB)
==================================================
downloaded 6.4 MB
ERROR: failed to lock directory ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1’ for modifying
Try removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-RcppEigen’
ERROR: dependency ‘RcppEigen’ is not available for package ‘RcppNumerical’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/RcppNumerical’
ERROR: dependencies ‘RcppEigen’, ‘RcppNumerical’ are not available for package ‘apeglm’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/apeglm’
ERROR: dependency ‘apeglm’ is not available for package ‘DiffBind’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/DiffBind’
The downloaded source packages are in
‘/tmp/RtmpOMlR7W/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
spatial, survival
Messaggi di avvertimento:
1: In .inet_warning(msg) :
installation of package ‘RcppEigen’ had non-zero exit status
2: In .inet_warning(msg) :
installation of package ‘RcppNumerical’ had non-zero exit status
3: In .inet_warning(msg) :
installation of package ‘apeglm’ had non-zero exit status
4: In .inet_warning(msg) :
installation of package ‘DiffBind’ had non-zero exit status
I was also trying to install apeglm, RcppNumerical and RcppEpigen but it returns to me with the same error message of failure installation.
Thank you,
Regards

Problems with installing package haven

I'm trying to install the package haven, but when opening it in the library it is said: there is no package "hms". So I've tryed to install the packing "hms". But it gives me this error messages:
> install.packages("hms", dependencies = TRUE)
Installing package into ‘C:/Users/Merete/OneDrive - uni-muenster.de/Dokumente/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘rlang’, ‘vctrs’
There are binary versions available but the source versions are later:
binary source needs_compilation
ellipsis 0.1.0 0.3.0 TRUE
rlang 0.3.4 0.4.6 TRUE
vctrs 0.1.0 0.3.0 TRUE
hms 0.4.2 0.5.3 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ellipsis_0.1.0.zip'
Content type 'application/zip' length 30847 bytes (30 KB)
downloaded 30 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/vctrs_0.1.0.zip'
Content type 'application/zip' length 499748 bytes (488 KB)
downloaded 488 KB
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
package ‘vctrs’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Merete\AppData\Local\Temp\RtmpakYjr4\downloaded_packages
installing the source package ‘hms’
trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.3.tar.gz'
Content type 'application/x-gzip' length 134669 bytes (131 KB)
downloaded 131 KB
ERROR: dependency 'rlang' is not available for package 'hms'
* removing 'C:/Users/Merete/OneDrive - uni-muenster.de/Dokumente/R/win-library/3.4/hms'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Merete\OneDrive - uni-muenster.de\Dokumente\R\win-library\3.4" C:\Users\Merete\AppData\Local\Temp\RtmpakYjr4/downloaded_packages/hms_0.5.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Merete\AppData\Local\Temp\RtmpakYjr4\downloaded_packages’
> library(hms)
Error in library(hms) : es gibt kein Paket namens ‘hms’ (there is no package "hms)
>
I am new to R, so there might be an easy answer to this, but on my own I was not able to solve the problem.

How to install caret package. Tried install.packages("caret") but getting error

After install.packages("caret") getting below error:
Installing package into ‘...../R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘recipes’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.3.4 0.4.0 TRUE
recipes 0.1.5 0.1.6 FALSE
caret 6.0-81 6.0-84 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/caret_6.0-81.zip'
Content type 'application/zip' length 5392174 bytes (5.1 MB)
downloaded 5.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
.........\Temp\RtmpkJG4l1\downloaded_packages
installing the source package ‘recipes’
trying URL 'https://cran.rstudio.com/src/contrib/recipes_0.1.6.tar.gz'
Content type 'application/x-gzip' length 968331 bytes (945 KB)
downloaded 945 KB
ERROR: dependency 'rlang' is not available for package 'recipes'
* removing 'C:/Users/PBiradarP/Documents/R/win-library/3.4/recipes'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "......\R\win-library\3.4"
...../Temp\RtmpkJG4l1/downloaded_packages/recipes_0.1.6.tar.gz' had status 1
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
I have tried and installed "rlang" package also. Its dependent on "recepies" package so again downloaded that too...
getting this message after installing this.
:Warning in install.packages :
package ‘recepies’ is not available (for R version 3.4.4)
I need to load caret package to be installed.
If you are using Windows, try this:
Add your library to libpaths; see this answer. After that try installing packages; see this answer:
install.packages("caret", dependencies=TRUE, type="win.binary")

I need to use R version 3.3.3. Is there a way to install packages successfully? I am unable to install any packages

I need to use R 3.3.3 for SPSS Modeler 18.1. I am unable to install any packages in this version of R.
I have a version of R 3.5.1 and am successfully using it with RStudio. I need to use R 3.3.3 for SPSS Modeler 18.1. I am unable to install any packages. I tried update.packages(), install.packages with type="source" or "both", tried devtools, but can't install devtools either. I believe there's a binary and source mismatch that needs_compilation, but can't seem to figure out how to fix it. This is happening for every package I can think of that I normally use: dplyr, tidyverse, ggplot2, forecast, etc etc.
install.packages('dplyr')
library('dplyr')
install.packages('pillar')
install.packages('devtools')
> install.packages('dplyr')
also installing the dependency ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.2.0 0.3.1 TRUE
dplyr 0.7.4 0.7.8 TRUE
Binaries will be installed
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/rlang_0.2.0.zip'
Content type 'application/zip' length 754726 bytes (737 KB)
downloaded 737 KB
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/dplyr_0.7.4.zip'
Content type 'application/zip' length 2897358 bytes (2.8 MB)
downloaded 2.8 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘rlang’
package ‘dplyr’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘dplyr’
The downloaded binary packages are in
C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages
> library('dplyr')
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pillar’
Error: package or namespace load failed for ‘dplyr’
> install.packages('pillar')
also installing the dependencies ‘fansi’, ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
fansi 0.2.2 0.4.0 TRUE
rlang 0.2.0 0.3.1 TRUE
pillar 1.2.1 1.3.1 FALSE
Binaries will be installed
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/fansi_0.2.2.zip'
Content type 'application/zip' length 141745 bytes (138 KB)
downloaded 138 KB
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/rlang_0.2.0.zip'
Content type 'application/zip' length 754726 bytes (737 KB)
downloaded 737 KB
package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘rlang’
The downloaded binary packages are in
C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages
installing the source package ‘pillar’
trying URL 'https://cran.mtu.edu/src/contrib/pillar_1.3.1.tar.gz'
Content type 'application/x-gzip' length 103972 bytes (101 KB)
downloaded 101 KB
ERROR: dependency 'rlang' is not available for package 'pillar'
* removing 'C:/Program Files/R/R-3.3.3/library/pillar'
The downloaded source packages are in
‘C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/pillar_1.3.1.tar.gz' had status 1
2: In install.packages("pillar") :
installation of package ‘pillar’ had non-zero exit status
> install.packages('devtools')
also installing the dependencies ‘git2r’, ‘pkgbuild’, ‘pkgload’, ‘rcmdcheck’
There are binary versions available but the source versions are later:
binary source needs_compilation
git2r 0.21.0 0.24.0 TRUE
rcmdcheck 1.2.1 1.3.2 FALSE
devtools 1.13.5 2.0.1 FALSE
Binaries will be installed
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘pkgload’
These will not be installed
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/git2r_0.21.0.zip'
Content type 'application/zip' length 3022652 bytes (2.9 MB)
downloaded 2.9 MB
package ‘git2r’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages
installing the source packages ‘pkgbuild’, ‘rcmdcheck’, ‘devtools’
trying URL 'https://cran.mtu.edu/src/contrib/pkgbuild_1.0.2.tar.gz'
Content type 'application/x-gzip' length 25264 bytes (24 KB)
downloaded 24 KB
trying URL 'https://cran.mtu.edu/src/contrib/rcmdcheck_1.3.2.tar.gz'
Content type 'application/x-gzip' length 1408582 bytes (1.3 MB)
downloaded 1.3 MB
trying URL 'https://cran.mtu.edu/src/contrib/devtools_2.0.1.tar.gz'
Content type 'application/x-gzip' length 388953 bytes (379 KB)
downloaded 379 KB
* installing *source* package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'callr', details:
call: loadNamespace(name)
error: there is no package called 'debugme'
ERROR: lazy loading failed for package 'pkgbuild'
* removing 'C:/Program Files/R/R-3.3.3/library/pkgbuild'
ERROR: dependency 'pkgbuild' is not available for package 'rcmdcheck'
* removing 'C:/Program Files/R/R-3.3.3/library/rcmdcheck'
ERROR: dependencies 'pkgbuild', 'pkgload', 'rcmdcheck' are not available for package 'devtools'
* removing 'C:/Program Files/R/R-3.3.3/library/devtools'
The downloaded source packages are in
‘C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/pkgbuild_1.0.2.tar.gz' had status 1
2: In install.packages("devtools") :
installation of package ‘pkgbuild’ had non-zero exit status
3: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/rcmdcheck_1.3.2.tar.gz' had status 1
4: In install.packages("devtools") :
installation of package ‘rcmdcheck’ had non-zero exit status
5: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/devtools_2.0.1.tar.gz' had status 1
6: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
#MrFlick, thank you. I was able to navigate and ended up using this site "https://www.r-bloggers.com/using-old-versions-of-r-packages/", and used a link from that post for binaries because I was having a lot of issues with that "https://cran.r-project.org/bin/windows/contrib/", and code example for package devtools: install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/devtools_1.13.5.zip", repos=NULL, type="source"). It all seems to work and load the libraries :). Thank you for the direction!

R does not find "update.packages"

I am running R in version 3.4.1 under Windows 7 64-bit. When I give update.packages(ask=FALSE) the routine starts, identifies some packages to be updated, downloads packages, and then returns:
Error in update.packages(ask = FALSE) :
could not find function "update.packages"
Execution halted
I cannot find a reason for this problem. I just installed the newest version of R.
Complete output: I add the complete output. Maybe the problem is hidden in here, see e.g. the Warning messages. I shortened some paths (...). The problem seems to be with package knitr?
There are binary versions available but the source versions are later:
binary source needs_compilation
knitr 1.16 1.17 FALSE
rlang 0.1.1 0.1.2 TRUE
Binaries will be installed
trying URL 'https://cran.wu.ac.at/bin/windows/contrib/3.4/rlang_0.1.1.zip'
Content type 'application/zip' length 466606 bytes (455 KB)
downloaded 455 KB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\...
installing the source package ‘knitr’
trying URL 'https://cran.wu.ac.at/src/contrib/knitr_1.17.tar.gz'
Content type 'application/x-gzip' length 769923 bytes (751 KB)
downloaded 751 KB
Error in update.packages(ask = FALSE) :
could not find function "update.packages"
Execution halted
The downloaded source packages are in
‘C:\Users\...’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "N:\RLibrary" C:\Users\...' had status 1
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘knitr’ had non-zero exit status

Resources