当前位置:   article > 正文

Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?报错

unable to fetch some archives, maybe run apt-get update or try with --fix-mi

在linux上使用apt-get方式安装nginx时提示Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
最后发现是源出现了问题

vim /etc/apt/sources.list
  • 1

使用vim编辑sources.list
把原来的镜像地址

http://archive.ubuntu.com/
  • 1

更换为

http://mirrors.aliyun.com/ubuntu
  • 1

之后还要执行更新操作

apt-get update
  • 1

否则会报Unable to locate package错误
这个命令的作用是:同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包。
最后顺利解决apt-get安装失败的问题,成功安装nginx
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/915241
推荐阅读
相关标签
  

闽ICP备14008679号