to install EBImage follow the instructions at http://bioconductor.org/packages/EBImage/:
> source("http://bioconductor.org/biocLite.R")
> biocLite("EBImage")
The installer will automatically fetch the version appropriate for your R. To use the recent release (version 4.12.2) you should be running R version 3.2.2 or 3.2.3.