Ubuntu 16.04 无法读取源列表

Ubuntu 16.04 无法读取源列表

我正在尝试更新我的软件包,但一直收到错误消息,

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

当我跑步时

sudo nano /etc/apt/sources.list

我在第 52 行看到以下代码

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

deb http://cran.rstudio.com/bin/linux/ubuntu xenial 有谁有什么想法吗?我尝试写信给 xenial partner,但没有成功。任何帮助都将不胜感激。谢谢

答案1

根据适用于 R 的 UBUNTU 软件包该版本的存储库deb的正确条目是(cranxenial注意末尾的斜线 /

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

这似乎是一个相当模糊的语法点:此类条目的一般形式是

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

然而来自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.

这里的情况就是如此。

相关内容