installation of package ‘DESeq2’ had non-zero exit status
1
0
Entering edit mode
7 weeks ago
Sarita • 0
if (!requireNamespace("BiocManager", quietly = TRUE))
+   install.packages("BiocManager")
> BiocManager::install("DESeq2", force = TRUE, Ncpus = 1)
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://cloud.r-project.org
Bioconductor version 3.21 (BiocManager 1.30.26), R 4.5.1 (2025-06-13)
Installing package(s) 'DESeq2'
trying URL 'https://bioconductor.org/packages/3.21/bioc/src/contrib/DESeq2_1.48.2.tar.gz'
Content type 'application/x-gzip' length 2683636 bytes (2.6 MB)
==================================================
downloaded 2.6 MB

* installing *source* package ‘DESeq2’ ...
** this is package ‘DESeq2’ version ‘1.48.2’
** using staged installation
** libs
using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0’
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/lib/R/site-library/Rcpp/include' -I'/usr/lib/R/site-library/RcppArmadillo/include'     -fpic  -g -O2 -ffile-prefix-map=/build/r-base-0RQCNp/r-base-4.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -c DESeq2.cpp -o DESeq2.o
In file included from /usr/lib/R/site-library/Rcpp/include/Rcpp/routines.h:26,
                 from /usr/lib/R/site-library/Rcpp/include/RcppCommon.h:127,
                 from /usr/lib/R/site-library/RcppArmadillo/include/RcppArmadilloForward.h:25,
                 from /usr/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:29,
                 from DESeq2.cpp:16:
/usr/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = true; std::streamsize = long int]’:
/usr/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:53:20: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   53 |         Rprintf("%.*s", num, s);
      |                  ~~^~   ~~~
      |                    |    |
      |                    int  std::streamsize {aka long int}
/usr/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = false; std::streamsize = long int]’:
/usr/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:57:21: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   57 |         REprintf("%.*s", num, s);
      |                   ~~^~   ~~~
      |                     |    |
      |                     int  std::streamsize {aka long int}
In file included from /usr/lib/R/site-library/Rcpp/include/RcppCommon.h:180,
                 from /usr/lib/R/site-library/RcppArmadillo/include/RcppArmadilloForward.h:25,
                 from /usr/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:29,
                 from DESeq2.cpp:16:
/usr/lib/R/site-library/Rcpp/include/Rcpp/print.h: In function ‘void Rcpp::warningcall(SEXP, const string&)’:
/usr/lib/R/site-library/Rcpp/include/Rcpp/print.h:30:19: error: format not a string literal and no format arguments [-Werror=format-security]
   30 |     Rf_warningcall(call, s.c_str());
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [/usr/lib/R/etc/Makeconf:211: DESeq2.o] Error 1
ERROR: compilation failed for package ‘DESeq2’
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/4.5/DESeq2’
The downloaded source packages are in
    ‘/tmp/RtmphORcmS/downloaded_packages’
Installation paths not writeable, unable to update packages
  path: /usr/lib/R/library
  packages:
    codetools, lattice, mgcv, spatial
  path: /usr/lib/R/site-library
  packages:
    abind, acepack, askpass, backports, bench, BH, bit, bit64, bitops, blob, brio, broom, cachem, callr, caret, caTools, cba, checkmate,
    chron, classInt, cli, cliapp, colorspace, commonmark, conquer, covr, cpp11, crayon, crosstalk, curl, CVST, data.table, DBI, DBItest,
    dbplyr, ddalpha, decor, deldir, DEoptimR, desc, diffobj, digest, dimRed, dplyr, DT, e1071, earth, evaluate, fansi, farver, fastICA,
    fastmap, fastmatch, filehash, FNN, Formula, fs, furrr, future, future.apply, gdata, generics, geometry, geosphere, ggplot2, gh, gitcreds,
    globals, glue, gower, gplots, gtable, gtools, hexbin, highr, Hmisc, hms, htmlTable, htmltools, htmlwidgets, httpuv, httr, igraph, interp,
    ipred, isoband, jpeg, jsonlite, kernlab, knitr, ks, labeling, later, latticeExtra, lava, lifecycle, linprog, listenv, lme4, lobstr,
    logcondens, lpSolve, lubridate, magic, magrittr, mapproj, maps, markdown, MatrixModels, matrixStats, mclust, mda, mets, mime, minqa,
    mlbench, MLmetrics, mockery, mockr, modeldata, multcomp, multicool, munsell, mvtnorm, nloptr, openssl, palmerpenguins, parallelly, pillar,
    pkgbuild, pkgKitten, pkgload, plot3D, plotmo, plotrix, pls, plyr, png, polyclip, pracma, prettyunits, pROC, processx, prodlim, profmem,
    progress, progressr, promises, proxy, ps, purrr, quantmod, quantreg, R6, ragg, RANN, RColorBrewer, Rcpp, RcppArmadillo, RcppEigen,
    RcppRoll, recipes, rgl, rlang, rmarkdown, robustbase, RPostgreSQL, rprojroot, rsample, RSpectra, RSQLite, rstudioapi, RUnit, s2, sandwich,
    sass, scales, setRNG, sfsmisc, shiny, slider, sodium, sourcetools, sp, SparseM, spatstat, spatstat.data, spatstat.geom, spatstat.linnet,
    spatstat.sparse, spatstat.utils, statmod, stringi, stringr, svglite, sys, systemfonts, TeachingDemos, tensor, testthat, textshaping,
    TH.data, tibble, tidyr, tidyselect, tikzDevice, timeDate, timereg, timeSeries, tinytex, tseries, TTR, units, utf8, vctrs, vdiffr, viridis,
    viridisLite, waldo, warp, webutils, withr, wk, xfun, XML, xml2, xts, yaml, zoo
Warning message:
In install.packages(...) :
  installation of package ‘DESeq2’ had non-zero exit status
DESeq2 • 1.3k views
ADD COMMENT
1
Entering edit mode

Installation paths not writeable, unable to update packages

Are you a normal user on a system administered by other admins?

ADD REPLY
0
Entering edit mode

Hi Sarita

welcome to the forum.

Quite an extensive post but I can't seem to find a real question?

Please don't simply dump tool output/warnings without any question tied to it. Do show what you did try already for instance ...

ADD REPLY
0
Entering edit mode
21 days ago
Kevin Blighe ★ 90k

The error you're encountering during the DESeq2 installation is due to an outdated version of the Rcpp package installed in your system's site library (/usr/lib/R/site-library/Rcpp). This older Rcpp triggers compilation warnings in its header files (specifically in print.h and Rstreambuf.h) that are treated as fatal errors because of the -Werror=format-security flag enabled by your GCC compiler (g++ 11.4.0). These issues—related to format string handling and precision specifiers—have been fixed in newer versions of Rcpp (CRAN's current version is 1.1.0 as of July 2025).

Since you lack write permissions for the system paths (as noted in the "Installation paths not writeable" message), you can't update the system Rcpp directly. Instead, install the latest Rcpp into your user library first, which takes precedence in R's library search path (.libPaths()) and will be used during DESeq2's compilation.

Step-by-Step Fix

  1. Install the latest Rcpp (this pulls from CRAN and installs to your user library at /home/user/R/x86_64-pc-linux-gnu-library/4.5):

    install.packages("Rcpp")
    
    • If prompted about repositories, confirm the use of https://cloud.r-project.org.
    • After installation, verify the version (should be 1.1.0 or later):
      packageVersion("Rcpp")
      
  2. Reinstall DESeq2 (now using the updated user Rcpp for compilation):

    BiocManager::install("DESeq2", force = TRUE, Ncpus = 1)
    

This should resolve the compilation errors. If you still see the system include path (-I'/usr/lib/R/site-library/Rcpp/include') in the logs after step 1, restart your R session and retry—the user library should now be detected first by DESeq2's configure script.

If this doesn't work or you get a new error, please reply here.

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 3331 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6