无法下载存储库信息(错误的 sources.list 条目或格式错误的文件)

无法下载存储库信息(错误的 sources.list 条目或格式错误的文件)

尝试更新包列表时出现以下错误日志:

Failed to download repository information
Check your Internet connection.
W:Failed to fetch http://ftp.wcss.pl/ubuntu/dists/trusty-updates/InRelease  Unable to find expected entry 'main/binary-aarch64/Packages' in Release file (Wrong sources.list entry or malformed file)
W:Failed to fetch http://ftp.wcss.pl/ubuntu/dists/trusty-backports/InRelease  Unable to find expected entry 'main/binary-aarch64/Packages' in Release file (Wrong sources.list entry or malformed file)
W:Failed to fetch http://ftp.wcss.pl/ubuntu/dists/trusty-security/InRelease  Unable to find expected entry 'main/binary-aarch64/Packages' in Release file (Wrong sources.list entry or malformed file)
W:Failed to fetch http://ftp.wcss.pl/ubuntu/dists/trusty/Release  Unable to find expected entry 'main/binary-aarch64/Packages' in Release file (Wrong sources.list entry or malformed file)
W:Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/raring/Release  Unable to find expected entry 'main/binary-aarch64/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.

尝试apt-get cleanautoclean更换服务器, 甚至移除建筑(但 dpkg 说我不能,因为它正在被数据库使用)。还尝试删除包含有问题的条目的行,但我的 sources.list 不包含它们。当我cat /etc/apt/sources.list /etc/apt/sources.list.d/*这样做时,我得到了以下结果:

# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.wcss.pl/ubuntu/ trusty main restricted
deb-src http://ftp.wcss.pl/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.wcss.pl/ubuntu/ trusty-updates main restricted
deb-src http://ftp.wcss.pl/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ftp.wcss.pl/ubuntu/ trusty universe
deb-src http://ftp.wcss.pl/ubuntu/ trusty universe
deb http://ftp.wcss.pl/ubuntu/ trusty-updates universe
deb-src http://ftp.wcss.pl/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ftp.wcss.pl/ubuntu/ trusty multiverse
deb-src http://ftp.wcss.pl/ubuntu/ trusty multiverse
deb http://ftp.wcss.pl/ubuntu/ trusty-updates multiverse
deb-src http://ftp.wcss.pl/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ftp.wcss.pl/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://ftp.wcss.pl/ubuntu/ trusty-backports main restricted universe multiverse

deb http://ftp.wcss.pl/ubuntu/ trusty-security main restricted
deb-src http://ftp.wcss.pl/ubuntu/ trusty-security main restricted
deb http://ftp.wcss.pl/ubuntu/ trusty-security universe
deb-src http://ftp.wcss.pl/ubuntu/ trusty-security universe
deb http://ftp.wcss.pl/ubuntu/ trusty-security multiverse
deb-src http://ftp.wcss.pl/ubuntu/ trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu trusty main
# deb-src http://extras.ubuntu.com/ubuntu trusty main
deb file:///var/cuda-repo-7-0-local /
deb file:///var/cuda-repo-7-0-local /
deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /
deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /
deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu trusty main
deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu trusty main
deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse
# deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse
deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64 /
deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64 /

这也不同于建议重复- 我的错误日志不包含损坏行的索引。实际上,我的日志sources.list甚至不包含与消息中提到的条目类似的条目。

我可以用它做什么?

答案1

根据这个错误:

 Unable to find expected entry 'main/binary-aarch64/Packages'

您已添加aarch64架构,但存储库没有适用于该架构的软件包。

查看:

dpkg --print-architecture

dpkg --print-foreign-architectures

你应该aarch64在国外的架构中看到。删除它:

dpkg --remove-architecture aarch64

如果出现此错误:

error: cannot remove architecture 'aarch64' currently in use by the database

您必须删除所有aarch64已安装的软件包:

dpkg -l | grep aarch64

删除找到的所有内容(使用sudo apt remove

然后再次尝试更新。

或者,如果你需要这些包,保留外部体系结构,并配置源列表中引发错误的每一行,以便仅搜索所需体系结构的包,方法是添加[ arch=amd64 ][ arch=i386,amd64 ]类似这样,例如:

deb [ arch=amd64 ] http://archive.ubuntu.com/ubuntu/ trusty-updates main

相关内容