CRAN/ Bioconductor package installs fail: Error: Line starting '<!DOCTYPE HTML PUBLI ...' is malformed

DaniCee picture DaniCee · Aug 21, 2015 · Viewed 7.5k times · Source

I have just made a fresh Ubuntu 14.04 installation and installed R following the instructions at this link and this other one, selecting the Berkeley mirror as I always do.

On emacs (+ess), I am unable to install any CRAN or Bioconductor package at all, for example:

install.packages("ggplot2")

Or:

source("http://bioconductor.org/biocLite.R")
biocLite("biomaRt")

I constantly get the following error:

Error: Line starting '<!DOCTYPE HTML PUBLI ...' is malformed!

Following on this other thread, I have just waited to see if the problem solved by itself, but after 2 days I keep getting the same error. Any suggestion??

Answer

DaniCee picture DaniCee · Aug 21, 2015

Alright I already solved the problem, turns out when prompting to select a CRAN mirror, I was selecting

USA (CA1) [https]

Instead of

(HTTP mirrors)

This is a feature I had never seen...

enter image description here

Selecting HTTP mirrors brings me to the list of mirrors I was expecting, and selecting now

USA (CA1)

Makes the installation process work perfectly. Thanks!

enter image description here