问题

执行这个命令sudo apt-get update, 会遇到如下提示

W: The repository 'https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial Release' does not have a Release file.

解决

直接在apt源里面找到对应的, 文件然后注释即可.

$ sudo grep -rwn docker /etc/apt/ 
Binary file /etc/apt/trusted.gpg matches
/etc/apt/sources.list_bak:56:deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable
/etc/apt/sources.list_bak:57:# deb-src [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable
/etc/apt/sources.list:56:deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable
/etc/apt/sources.list:57:# deb-src [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable
Binary file /etc/apt/trusted.gpg~ matches
/etc/apt/sources.list.save:56:deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable
/etc/apt/sources.list.save:57:# deb-src [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable

注释掉对于的行数即可. 前面加上# pound key.

# deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu xenial stable

然后在执行 sudo apt-get update

Reading package lists... Done

小结

遇到类似的问题, 直接就是找到对应的source.list里面有这个, 屏蔽了即可.

相关文章:

  • 2021-09-08
  • 2021-08-15
  • 2022-12-23
  • 2021-07-25
  • 2021-09-11
  • 2021-12-20
  • 2021-06-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2022-01-27
  • 2021-09-19
相关资源
相似解决方案