升级到 Gnome 16.04.01 后,列表文件中的条目 63 格式错误

cry*_*pto 5 upgrade updates gnome

我在 14.04 版本的 Ubuntu Gnome 中遇到了一些问题。我有几个星期都无法运行更新,每当我尝试时,都会收到“检查您的互联网连接”的回复。我在这里找到了很多解决问题的方法,但它们对我不起作用。所以,我今天早上使用可启动 USB 升级到 16.04,我选择了升级选项而不是清理我的硬盘。在较新的版本上,我确实尝试更新它,但现在出现此错误...

sudo apt-get update
E: Malformed entry 63 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
Run Code Online (Sandbox Code Playgroud)

当我运行以下命令时,我得到了这个输出

find /etc/apt/  -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list.d/staticfloat-ubuntu-julia-deps-xenial.list

     1  deb http://ppa.launchpad.net/staticfloat/julia-deps/ubuntu xenial main
     2  # deb-src http://ppa.launchpad.net/staticfloat/julia-deps/ubuntu xenial main

/etc/apt/sources.list

     1  # deb cdrom:[Ubuntu-GNOME 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160720)]/ xenial main multiverse restricted universe
     2  # deb cdrom:[Ubuntu-GNOME 14.04 LTS _Trusty Tahr_ - Release i386 (20140416.2)]/ trusty main multiverse restricted universe
     3  
     4  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
     5  # newer versions of the distribution.
     6  deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
     7  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
     8  
     9  ## Major bug fix updates produced after the final release of the
    10  ## distribution.
    11  deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
    12  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
    13  
    14  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    15  ## team. Also, please note that software in universe WILL NOT receive any
    16  ## review or updates from the Ubuntu security team.
    17  deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
    18  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
    19  deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
    20  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
    21  
    22  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
    23  ## team, and may not be under a free licence. Please satisfy yourself as to 
    24  ## your rights to use the software. Also, please note that software in 
    25  ## multiverse WILL NOT receive any review or updates from the Ubuntu
    26  ## security team.
    27  deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
    28  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
    29  deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
    30  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
    31  
    32  ## N.B. software from this repository may not have been tested as
    33  ## extensively as that contained in the main release, although it includes
    34  ## newer versions of some applications which may provide useful features.
    35  ## Also, please note that software in backports WILL NOT receive any review
    36  ## or updates from the Ubuntu security team.
    37  deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    38  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    39  
    40  deb http://de.archive.ubuntu.com/ubuntu/ xenial-security main restricted
    41  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-security main restricted
    42  deb http://de.archive.ubuntu.com/ubuntu/ xenial-security universe
    43  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-security universe
    44  deb http://de.archive.ubuntu.com/ubuntu/ xenial-security multiverse
    45  deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-security multiverse
    46  
    47  ## Uncomment the following two lines to add software from Canonical's
    48  ## 'partner' repository.
    49  ## This software is not part of Ubuntu, but is offered by Canonical and the
    50  ## respective vendors as a service to Ubuntu users.
    51  deb http://archive.canonical.com/ubuntu xenial partner
    52  deb-src http://archive.canonical.com/ubuntu xenial partner
    53  
    54  ## This software is not part of Ubuntu, but is offered by third-party
    55  ## developers who want to ship their latest software.
    56  deb http://extras.ubuntu.com/ubuntu xenial main
    57  deb http://archive.canonical.com/ xenial partner
    58  # deb-src http://archive.canonical.com/ trusty partner
    59  deb-src http://extras.ubuntu.com/ubuntu xenial main
    60  deb http://ppa.launchpad.net/whatsapp-purple/ppa/ubuntu xenial main
    61  # deb-src http://ppa.launchpad.net/whatsapp-purple/ppa/ubuntu trusty main
    62  # deb-src http://archive.ubuntu.com/ubuntu trusty universe
    63  deb http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu xenial
    64  # deb-src http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu trusty/
    65  
    66  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    67  # newer versions of the distribution.
    68  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
    69  
    70  ## Major bug fix updates produced after the final release of the
    71  ## distribution.
    72  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
    73  
    74  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    75  ## team, and may not be under a free licence. Please satisfy yourself as to
    76  ## your rights to use the software. Also, please note that software in
    77  ## universe WILL NOT receive any review or updates from the Ubuntu security
    78  ## team.
    79  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
    80  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
    81  
    82  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
    83  ## team, and may not be under a free licence. Please satisfy yourself as to 
    84  ## your rights to use the software. Also, please note that software in 
    85  ## multiverse WILL NOT receive any review or updates from the Ubuntu
    86  ## security team.
    87  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
    88  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
    89  
    90  ## N.B. software from this repository may not have been tested as
    91  ## extensively as that contained in the main release, although it includes
    92  ## newer versions of some applications which may provide useful features.
    93  ## Also, please note that software in backports WILL NOT receive any review
    94  ## or updates from the Ubuntu security team.
    95  # deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    96  
    97  ## Uncomment the following two lines to add software from Canonical's
    98  ## 'partner' repository.
    99  ## This software is not part of Ubuntu, but is offered by Canonical and the
   100  ## respective vendors as a service to Ubuntu users.
   101  # deb http://archive.canonical.com/ubuntu xenial partner
   102  # deb-src http://archive.canonical.com/ubuntu xenial partner
   103  
   104  deb http://security.ubuntu.com/ubuntu xenial-security main restricted
   105  # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
   106  deb http://security.ubuntu.com/ubuntu xenial-security universe
   107  # deb-src http://security.ubuntu.com/ubuntu xenial-security universe
   108  deb http://security.ubuntu.com/ubuntu xenial-security multiverse
   109  # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
Run Code Online (Sandbox Code Playgroud)

您能否建议可以采取哪些措施来解决这些问题?

mur*_*uru 12

感兴趣的线路是:

63  deb http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu xenial
64  # deb-src http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu trusty/
Run Code Online (Sandbox Code Playgroud)

正如错误说,你缺少的一个组成部分(中mainuniverse等其他回购)。然而,CRAN 镜像没有组件,而是使用一个简单的 repo,所以你需要在/那里有一个像trusty线一样的尾随:

deb http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu xenial/
Run Code Online (Sandbox Code Playgroud)


cl-*_*box 5

更正/etc/apt/sources.list文件中的错误条目。

打开终端并执行以下命令:

sudo nano /etc/apt/sources.list  
Run Code Online (Sandbox Code Playgroud)

删除/etc/apt/sources.list文件中的第 63 行和第 64 行。

Ctrl+X关闭文件,用 确认更改Y

现在将存储库重新添加到软件源:

sudo nano /etc/apt/sources.list.d/star-st-andrews.list  
Run Code Online (Sandbox Code Playgroud)

将以下行(条目)添加到空文件中:

deb http://www-star.st-and.ac.uk/cran/bin/linux/ubuntu/ xenial/
# deb-src http://www-star.st-and.ac.uk/cran/bin/linux/ubuntu/ xenial/
Run Code Online (Sandbox Code Playgroud)

Ctrl+X关闭文件,用 确认更改Y

参考CRAN 存储库

如果在更新软件源时仍然收到错误消息,则应检查/etc/apt/sources.list文件和/etc/apt/sources.list.d文件夹中是否有其他错误条目。通常建议在升级系统之前删除外部源。升级后重新添加源,这会导致在正确位置的正确条目。

注意:在较新的 Ubuntu 版本中,该/etc/apt/sources.list文件用于 Ubuntu 源。
所有外部软件源都以.list文件形式存在于/etc/apt/sources.list.d文件夹中。