'Hash Sum mismatch'。具体如何编辑/etc/apt/sources.list?
'Hash Sum mismatch'. How to edit /etc/apt/sources.list specifically?
当我尝试更新我的 apt-get 时:
$ sudo apt-get update
警告每次都会出现如下所示:
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages Hash Sum mismatch
在搜索了这个问题的解决方案后,我遇到了如下问题:
For now, I edited /etc/apt/sources.list and updated it with a new
mirror which solved the primary issue of not being able to find a
candidate package.
但是,我不知道具体如何编辑/etc/apt/sources.list。能详细说说怎么编辑吗?提前致谢。
首先使用提升的用户权限使用文本编辑器打开它。在这个例子中,我使用 vim
:
sudo vim /etc/apt/sources.list
在里面你应该看到这样一行:
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
建议是将 cn
国家代码更改为不同的国家代码镜像。例如,我在那里有 us
镜像。
当我尝试更新我的 apt-get 时:
$ sudo apt-get update
警告每次都会出现如下所示:
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages Hash Sum mismatch
在搜索了这个问题的解决方案后,我遇到了如下问题:
For now, I edited /etc/apt/sources.list and updated it with a new mirror which solved the primary issue of not being able to find a candidate package.
但是,我不知道具体如何编辑/etc/apt/sources.list。能详细说说怎么编辑吗?提前致谢。
首先使用提升的用户权限使用文本编辑器打开它。在这个例子中,我使用 vim
:
sudo vim /etc/apt/sources.list
在里面你应该看到这样一行:
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
建议是将 cn
国家代码更改为不同的国家代码镜像。例如,我在那里有 us
镜像。