更新时“无法获取”

Far*_* BA 5 apt software-sources

我最近试图从 ubuntu 12.10 更新,但我不断收到“无法获取”错误。

W: Failed to fetch
http://security.ubuntu.com/ubuntu/dists/quantal-security/Release 
Unable to find expected entry 'independent/binary-amd64/Packages' in
Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/quantal/Release  Unable to find
expected entry 'independent/source/Sources' in Release file (Wrong
sources.list entry or malformed file)

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/quantal-updates/Release  Unable
to find expected entry 'independent/binary-amd64/Packages' in Release
file (Wrong sources.list entry or malformed file)

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/quantal-backports/Release 
Unable to find expected entry 'independent/binary-amd64/Packages' in
Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old
ones used instead.
Run Code Online (Sandbox Code Playgroud)

我更改了服务器并从/var/lib/apt/lists/某些答案中删除了源列表,但仍然如此。这真的很烦人。

Nic*_*Tux 5

消息

(错误的sources.list条目或格式错误的文件)

意味着sources.list文件中的某些条目错误或行格式错误。

搜索网络,我发现了这个老错误,它并不完全是旧的,而是已过期

解决方案(解决方法是更好的单词)是检查您的文件并删除独立于sources.list行的单词。尝试一下。

下面是一个查看所有条目的详细命令sources.list

find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;
Run Code Online (Sandbox Code Playgroud)