I've been trying to install DESeq2 for differential expression analysis. Unfortunately, installation keeps failing because the dependencies can not be installed. The culprit is the XVector package, that is required for one of DESeq2's dependencies. This is the error:
# Installing if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("DESeq2") # Error fatal error: zlib.h: No such file or directory 16 | #include <zlib.h> | ^~~~~~~~ compilation terminated. make: *** [/usr/local/lib/R/etc/Makeconf:172: io_utils.o] Error 1 ERROR: compilation failed for package ‘XVector’ * removing ‘/usr/local/lib/R/site-library/XVector
Due to this zlib.h file that is not found, the installation fails. I'm working in rstudio hosted from a docker container based on the rocker/rstudio:4.0.5 (newer versions like 4.1.1 throw the same error). Installing zlib by running
sudo apt-get install zlib1g in the docker container does not solve the problem, as zlib1g is already installed with the newest version.
I found that the error occurs even for an unaltered R 4.0.5, find the sessionInfo below.
> sessionInfo() R version 4.0.5 (2021-03-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.3 LTS Matrix products: default BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8  LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C LC_PAPER=en_US.UTF-8 LC_NAME=C  LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):  BiocManager_1.30.15 compiler_4.0.5 tools_4.0.5
Has anyone found a way to deal with zlib.h issues?