While running the update at Ubuntu 14.04 LTS (Trusty Tahr). The following error is being encountered:
在Ubuntu 14.04 LTS (Trusty Tahr)上运行更新。遇到以下错误:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-i386/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-i386/Packages Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en Hash Sum mismatch
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/Translation-en Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
5 个解决方案
#1
8
This worked for me:
这工作对我来说:
rm /var/lib/apt/lists/* -vf
apt-get update
Hope it helps someone else. Cheers!
希望它能帮助别人。干杯!
#2
6
There are many problem due to which this issue has come. Some of then are :
由于这个问题的出现,有许多问题。有些是:
- Any entry in you apt.list is not working. You or any application has created a wrong entry.
- 列表中的任何条目都不起作用。您或任何应用程序都创建了错误的条目。
- apt repository are not currently working.
- apt存储库目前没有工作。
- Corrupt in /var/lib/apt/lists/ folder.
- 腐败/var/lib/apt/lists/文件夹中。
So for both of them there are different solution, if you didn't know the exact problem then follow following steps:
所以对于这两种情况都有不同的解决方案,如果你不知道具体的问题然后按照以下步骤进行:
- Use another mirrors of apt. In ubuntu there is file name
/etc/apt/sources.list
and folder containing some files in/etc/apt/sources.list.d/
. So, from there you can change use any other mirrors of apt. Like you can change your India repository to US repository, etc. by editing these files. - 使用另一个apt的镜像。在ubuntu中有文件名/etc/ apt/sources。在/etc/apt/sources.list.d/中包含一些文件的列表和文件夹。因此,您可以在那里更改使用任何其他apt的镜像,比如您可以通过编辑这些文件来更改您的印度存储库到我们的存储库等。
-
There is another possibility too that you having any other repository link (third party) which is not responding for the moment. So, you can also delete them from the above given files. You can also remove all third party repositories from list
还有另一种可能,即您有任何其他的存储库链接(第三方),而这是暂时没有响应的。因此,您也可以从上面的文件中删除它们。您还可以从列表中删除所有第三方存储库。
rm -rf /etc/apt/sources.list.d/*
rm射频/etc/apt/sources.list.d / *
-
Remove all contents from
/var/lib/apt/lists/
从/var/lib/apt/lists/中删除所有内容。
rm -rf /var/lib/apt/lists/*
rm射频/var/lib/apt/lists/*
#3
3
Something is up with the us.archive.ubuntu.com server.
有一些东西是由us.archive.ubuntu.com服务器提供的。
I fixed it by changing all of the us.archive.ubuntu.com urls to in.archive.ubuntu.com in /etc/apt/sources.list
我通过改变所有的us.archive.ubuntu.com的url来修复它,在/etc/apt/sources.list中。
I used vim with find and replace like this:
我使用vim查找和替换如下:
sudo vim /etc/apt/sources.list
:%s/us.archive/in.archive/g
:wq
#4
1
I had this issue on my ubuntu on virtualbox before. I tried all above but that won't help.
我之前在我的ubuntu上有这个问题。我试过了,但那没有用。
When I worked on other backup script and I recognized that my server had incorrect date/time. I have change that and the apt-get update works like a charm.
当我在其他备份脚本上工作时,我发现我的服务器有错误的日期/时间。我已经改变了这一点,而apt-get的更新就像一种魅力。
#5
1
The following command should work
下面的命令应该有效。
sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list
#1
8
This worked for me:
这工作对我来说:
rm /var/lib/apt/lists/* -vf
apt-get update
Hope it helps someone else. Cheers!
希望它能帮助别人。干杯!
#2
6
There are many problem due to which this issue has come. Some of then are :
由于这个问题的出现,有许多问题。有些是:
- Any entry in you apt.list is not working. You or any application has created a wrong entry.
- 列表中的任何条目都不起作用。您或任何应用程序都创建了错误的条目。
- apt repository are not currently working.
- apt存储库目前没有工作。
- Corrupt in /var/lib/apt/lists/ folder.
- 腐败/var/lib/apt/lists/文件夹中。
So for both of them there are different solution, if you didn't know the exact problem then follow following steps:
所以对于这两种情况都有不同的解决方案,如果你不知道具体的问题然后按照以下步骤进行:
- Use another mirrors of apt. In ubuntu there is file name
/etc/apt/sources.list
and folder containing some files in/etc/apt/sources.list.d/
. So, from there you can change use any other mirrors of apt. Like you can change your India repository to US repository, etc. by editing these files. - 使用另一个apt的镜像。在ubuntu中有文件名/etc/ apt/sources。在/etc/apt/sources.list.d/中包含一些文件的列表和文件夹。因此,您可以在那里更改使用任何其他apt的镜像,比如您可以通过编辑这些文件来更改您的印度存储库到我们的存储库等。
-
There is another possibility too that you having any other repository link (third party) which is not responding for the moment. So, you can also delete them from the above given files. You can also remove all third party repositories from list
还有另一种可能,即您有任何其他的存储库链接(第三方),而这是暂时没有响应的。因此,您也可以从上面的文件中删除它们。您还可以从列表中删除所有第三方存储库。
rm -rf /etc/apt/sources.list.d/*
rm射频/etc/apt/sources.list.d / *
-
Remove all contents from
/var/lib/apt/lists/
从/var/lib/apt/lists/中删除所有内容。
rm -rf /var/lib/apt/lists/*
rm射频/var/lib/apt/lists/*
#3
3
Something is up with the us.archive.ubuntu.com server.
有一些东西是由us.archive.ubuntu.com服务器提供的。
I fixed it by changing all of the us.archive.ubuntu.com urls to in.archive.ubuntu.com in /etc/apt/sources.list
我通过改变所有的us.archive.ubuntu.com的url来修复它,在/etc/apt/sources.list中。
I used vim with find and replace like this:
我使用vim查找和替换如下:
sudo vim /etc/apt/sources.list
:%s/us.archive/in.archive/g
:wq
#4
1
I had this issue on my ubuntu on virtualbox before. I tried all above but that won't help.
我之前在我的ubuntu上有这个问题。我试过了,但那没有用。
When I worked on other backup script and I recognized that my server had incorrect date/time. I have change that and the apt-get update works like a charm.
当我在其他备份脚本上工作时,我发现我的服务器有错误的日期/时间。我已经改变了这一点,而apt-get的更新就像一种魅力。
#5
1
The following command should work
下面的命令应该有效。
sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list