伙计们,这不是一个重复的问题,如果是,那么所有的解决方案对我来说都不起作用。我在新安装的系统中看到了这个问题。我尝试了互联网上提供的所有方法,包括创建一个新的 sources.list,删除了 list.d 文件夹的条目,但当我尝试运行命令时,apt-get update
我得到了以下信息:
W: Failed to fetch http://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)
这是来源列表
deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty universe main multiverse restricted
deb http://security.ubuntu.com/ubuntu/ trusty-security universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu trusty-updates universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu trusty-backports universe main multiverse restricted
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner
# deb http://extras.ubuntu.com/ubuntu trusty main
# deb-src http://extras.ubuntu.com/ubuntu trusty main
答案1
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release
正如警告所暗示的那样,无法获取该 URL。这是您的网络问题。不是 source.list 问题。检查您的互联网连接是否正常。您是否在需要手动设置代理的网络上?在这种情况下,sudo apt-get update
如果未针对 sudo 环境正确设置代理,则会失败。
答案2
你试过这个吗
alther the sources.list file whit gedit
然后在底部输入
deb http://archive.ubuntu.com/ubuntu/dists/trusty/Release
# deb-src http://archive.ubuntu.com/dists/trusty/Release
这样也许能很好地发挥作用。
答案3
用这个
http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release
相反
http://archive.ubuntu.com/ubuntu/dists/trusty/Release
或将 DNS 更改为 google DNS 或 Open DNS
谷歌域名系统
8.8.8.8
8.8.4.4
开放 DNS
208.67.222.222
208.67.220.220
或者你仍然遇到问题,请参阅此社区帮助
https://help.ubuntu.com/community/Repositories/Ubuntu