0

I am trying to update my packages put I keep getting an error saying,

E: Malformed entry 52 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read

When I run

sudo nano /etc/apt/sources.list

I get these lines of code on line 52

deb http://cran.rstudio.com/bin/linux/ubuntu xenial 

deb http://cran.rstudio.com/bin/linux/ubuntu xenial Anyone have any ideas, I tried to write xenial partner but to no avail. Any help would be very much appreciated. Thanks

1 Answers1

2

According to UBUNTU PACKAGES FOR R the correct deb entry for the cran repository for the xenial release is (note the trailing slash /)

deb http://cran.rstudio.com/bin/linux/ubuntu xenial/

This seems to be a rather obscure point of syntax: the general form for such entries is

deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]

however from man sources.list:

   The URI for the deb type must specify the base of the Debian
   distribution, from which APT will find the information it needs.  suite
   can specify an exact path, in which case the components must be omitted
   and suite must end with a slash (/). This is useful for the case when
   only a particular sub-directory of the archive denoted by the URI is of
   interest. If suite does not specify an exact path, at least one
   component must be present.

which is the case here.

steeldriver
  • 142,475