debian9使用安装命令apt-get install时遇错误404

debian9使用安装命令apt-get install时遇错误404

问题如下图

错误:1 http://security.debian.org/debian-security stretch/updates/main amd64 poppler-utils amd64 0.48.0-2+deb9u4
404 Not Found [IP: 151.101.194.132 80]
E: 无法下载 http://security.debian.org/debian-security/pool/updates/main/p/poppler/poppler-utils_0.48.0-2+deb9u4_amd64.deb 404 Not Found [IP: 151.101.194.132 80]
在这里插入图片描述

解决办法:

第一步:先备份/etc/apt/sources.list
第二步:根据系统版本(命令hostnamectl 查看系统版本)在阿里巴巴镜像源找到合适的镜像源
以下是系统debian9的示例
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目

deb https://mirrors.aliyun.com/debian-archive/debian stretch main contrib non-free
#deb https://mirrors.aliyun.com/debian-archive/debian stretch-proposed-updates main non-free contrib
deb https://mirrors.aliyun.com/debian-archive/debian stretch-backports main non-free contrib
deb https://mirrors.aliyun.com/debian-archive/debian-security stretch/updates main contrib non-free
deb-src https://mirrors.aliyun.com/debian-archive/debian stretch main contrib non-free
#deb-src https://mirrors.aliyun.com/debian-archive/debian stretch-proposed-updates main contrib non-free
deb-src https://mirrors.aliyun.com/debian-archive/debian stretch-backports main contrib non-free
deb-src https://mirrors.aliyun.com/debian-archive/debian-security stretch/updates main contrib non-free

第三步:执行sudo apt-get update
如果update时遇见下图一直卡主的情况
在这里插入图片描述
解决办法:将/etc/apt/sources.list文件中的https改成http;然后再执行sudo apt-get update,能顺利执行下去就可以再试一次安装了

  • 6
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值