软件和更新问题

软件和更新问题

原始问题

我遇到了如下问题:

W:Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'restricted/source/Sources' 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.

然后我发现答案。请按照以下步骤操作:

sudo -i
echo "deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse" > /etc/apt/sources.list

然后执行sudo apt-get update,发现问题:

Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty Release.gpg [72 B]
Get:2 http://archive.ubuntu.com trusty Release [11.9 kB]
Get:3 http://archive.ubuntu.com trusty/main i386 Packages [14 B]
Fetched 12.0 kB in 0s (22.7 kB/s)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'universe/binary-i386/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.

我发现 在此处输入图片描述

请告诉我如何解决?

Neil 回答后的更新:

出现以下问题

在此处输入图片描述

答案1

您必须删除损坏的源文件,然后software-properties-gtk通过按Ctrl+ Alt+将其添加回来T

sudo rm -f /etc/apt/*
sudo rm -f /etc/apt/sources.list.d/*
sudo rm -f /etc/apt/apt.conf.d/*

然后运行

sudo software-properties-gtk

勾选复选框,将服务器更改为美国服务器或您选择的任何其他服务器,然后单击“关闭”。

在此处输入图片描述

在此处输入图片描述

然后点击重新加载。

等待它完成然后运行:

sudo apt-get update

相关内容