编辑:感谢您的帮助@DavidFoerster - 不确定 pastie 服务如何工作,但希望人们能在sudo apt-get update
这里找到输出:
https://paste.ubuntu.com/25812862/
编辑:这被标记为重复。但是,我按照两篇推荐文章中建议的所有方法做了,但还是没有成功。文章结尾处可以看到它失败的结果。尽管我尝试了所有方法但都没有成功,但它仍然被标记为重复。是对方没有看到我添加的内容,还是我遗漏了什么,因为据我所知,我尝试了所有建议的方法但仍然没有成功,所以它肯定不是重复的,对吧?
我搜索了好久,还是没找到任何有用的方法。以下是我尝试过的方法。
我正在使用 Ubuntu MATE 1.12.1,无论我使用“软件和更新”还是sudo apt-get update
似乎无法连接到存储库。
我在“软件和更新”中使用了主服务器和英国服务器,但是当它显示:
有关可用软件的信息已过时
要从新添加或更改的源安装软件和更新,您必须重新加载有关可用软件的信息。
您需要有效的互联网连接才能继续。
我按下“重新加载”,它显示:
无法下载存储库信息
检查您的互联网连接。
添加:详细信息选项卡显示:
W:The repository 'http://security.ubuntu.com/ubuntu wily-security Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., W:See apt-secure(8) manpage for repository creation and user configuration details., W:The repository 'http://gb.archive.ubuntu.com/ubuntu wily-updates Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., W:See apt-secure(8) manpage for repository creation and user configuration details., W:The repository 'http://gb.archive.ubuntu.com/ubuntu wily-backports Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use., W:See apt-secure(8) manpage for repository creation and user configuration details., E:Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/main/source/Sources 404 Not Found [IP: 91.189.88.152 80], E:Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/wily-backports/restricted/source/Sources 404 Not Found [IP: 91.189.88.161 80], E:Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/wily-updates/main/source/Sources 404 Not Found [IP: 91.189.88.161 80], E:Some index files failed to download. They have been ignored, or old ones used instead.
从命令行(再次我无法显示输出,因为它有太多链接,所以这里有一个缩短的例子:
sudo apt-get update
Ign:1 <LINK> trusty InRelease
Ign:2 <LINK> wily InRelease
...
W: <LINK>: Signature by key 824A27DD09DEDA33BF7835962EA8F35793D8809A uses weak digest algorithm (SHA1)
W: The repository '<LINK> wily Release' does not have a Release file.
W: The repository '<LINK> wily-updates Release' does not have a Release file.
W: The repository '<LINK> wily-backports Release' does not have a Release file.
W: The repository '<LINK> wily-security Release' does not have a Release file.
E: Failed to fetch <LINK> 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch <LINK> 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch <LINK> 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch <LINK> 404 Not Found [IP: 91.189.88.161 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
我的互联网似乎运行良好:我可以浏览网页并 ping 谷歌。
oli@oli-Lenovo-G580:~$ ping www.google.com
PING www.google.com (216.58.204.100) 56(84) bytes of data.
64 bytes from par10s28-in-f4.1e100.net (216.58.204.100): icmp_seq=1 ttl=52 time=28.4 ms
64 bytes from par10s28-in-f4.1e100.net (216.58.204.100): icmp_seq=2 ttl=52 time=27.4 ms
64 bytes from par10s28-in-f4.1e100.net (216.58.204.100): icmp_seq=3 ttl=52 time=27.2 ms
64 bytes from par10s28-in-f4.1e100.net (216.58.204.100): icmp_seq=4 ttl=52 time=25.4 ms
^C
--- www.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 25.489/27.172/28.499/1.092 ms
我还尝试了前面代码段中的最后一个 IP 地址,并且连接正常:
oli@oli-Lenovo-G580:~$ ping 91.189.88.161
PING 91.189.88.161 (91.189.88.161) 56(84) bytes of data.
64 bytes from 91.189.88.161: icmp_seq=1 ttl=51 time=26.6 ms
64 bytes from 91.189.88.161: icmp_seq=2 ttl=51 time=27.4 ms
64 bytes from 91.189.88.161: icmp_seq=3 ttl=51 time=144 ms
64 bytes from 91.189.88.161: icmp_seq=4 ttl=51 time=195 ms
64 bytes from 91.189.88.161: icmp_seq=5 ttl=51 time=123 ms
^C
--- 91.189.88.161 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 26.689/103.440/195.047/66.537 ms
我已经通过无线和有线连接完成了所有这些事情,似乎得到了相同/相似的结果。
以下是一些可能对大家有用的信息:
oli@oli-Lenovo-G580:~$ dig google.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2009
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 153 IN A 216.58.204.14
;; Query time: 13 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Oct 18 11:22:16 BST 2017
;; MSG SIZE rcvd: 55
我想显示内容,/etc/apt/sources.list
但是它不允许我显示,因为链接太多。
有人可以帮忙吗?
补充:有几个人提到了潜在的重复。
我不想使用不受支持的版本,因此我尝试了 sudo apt-get update && sudo apt-get dist-upgrade 这给了我相同的结果sudo apt-get update
,因此我尝试了 just sudo apt-get dist-upgrade
,它完成了,没有错误。sudo apt-get update
再次运行没有任何变化。
接下来我尝试:
sudo apt-get update
sudo apt-get install update-manager-core
sudo do-release-upgrade
第一个没有变化,第二个运行正常,第三个:
oli@oli-Lenovo-G580:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
No new release found
运行sudo apt-get update
结果输出相同。
-
sudo ppa-purge ppa:mc3man/trusty-media
看起来类似于如果我这样做sudo apt-get update
,最后一行说Warning: apt-get update failed for some reason
sudo add-apt-repository ppa:mc3man/xerus-media
看起来工作正常。阅读完此答案下方的评论后,我转到软件和更新,并在“其他软件”选项卡中取消勾选名称中带有 Wily 或 Trusty 的任何内容。当我关闭时,我得到了:
有关可用软件的信息已过时
要从新添加或更改的源安装软件和更新,您必须重新加载有关可用软件的信息。
您需要有效的互联网连接才能继续。
点击“重新加载”并得到:
Failed to download repository information
Check your Internet connection.
跑步sudo apt-get update
好像没有效果。
答案1
您的镜像似乎已弄乱。不久前我遇到了这种情况,我编辑了我的镜像/etc/apt/sources.list
并尝试了不同的镜像,结果成功了。我读到了一个新功能,可以根据您的位置自动选择正确的镜像,请尝试将其放在您的镜像之上/etc/apt/sources.list
。
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse