I'm trying to set up BiocManager and GenomicRanges for analyzing BAM alignment files. However, I get the bellow error : ```{r} ioutils.c:16:10: fatal error: zlib.h: No such file or directory #include <zlib.h> ^~~~~~~~ compilation terminated. make: *** [/usr/local/lib/R/etc/Makeconf:168: ioutils.o] Error 1 ERROR: compilation failed for package ‘XVector’ * removing ‘/usr/local/lib/R/site-library/XVector’ ERROR: dependency ‘XVector’ is not available for package ‘GenomicRanges’ * removing ‘/usr/local/lib/R/site-library/GenomicRanges’
The downloaded source packages are in ‘/tmp/Rtmp9AuEa7/downloaded_packages’ Installation path not writeable, unable to update packages: boot, foreign, lattice, MASS, nlme, nnet Warning messages: 1: In install.packages(...) : installation of package ‘XVector’ had non-zero exit status 2: In install.packages(...) : installation of package ‘GenomicRanges’ had non-zero exit status ```
Can you provide some details on what operating system you're using. The pertinent part of the error seems to be that you're missing
zlib.h
on your system.I'm using a docker image rocker/rstudio:latest . Its a Linux instance
In which case I suggest taking a look at https://hub.docker.com/r/bioconductor/bioconductor_docker which should have the system libraries to install (almost) all Bioconductor packages.
Alternatively, you could probably add
apt-get install zlib-dev
to your docker file.I'm using a docker image rocker/rstudio:latest . Its a Linux instance