Linux/Debian/Ubuntu报错解决:W: Target Packages (main/binary-amd64/Packages) is configured multiple times

解决Ubuntu更新库时的W: Target Packages配置重复错误
在Ubuntu系统中执行apt update时遇到'W: Target Packages (main/binary-amd64/Packages) is configured multiple times'错误。该问题源于更新源被配置多次。解决方法是检查并删除重复的更新源配置,确保系统文件的正确性。参考Ask Ubuntu上的相关问答可获取详细解决方案。

此文首发于我的Jekyll博客:zhang0peter的个人博客


今天在ubuntu上更新库(apt update)的时候遇到了报错:

-> # apt update                
Hit:1 http://mirrors.zju.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial InRelease
Hit:3 http://mirrors.zju.edu.cn/ubuntu bionic-security InRelease
Hit:4 http://mirrors.zju.edu.cn/ubuntu bionic-updates InRelease
Hit:5 http://mirrors.zju.edu.cn/ubuntu bionic-backports InRelease
Reading package lists... Done                      
Building dependency tree       
Reading state information... Done
37 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/kubernetes.list:1 and /etc/apt/sources.list.d/kubernetes.list:2
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d
sudo apt update Get:1 http://mirrors.ustc.edu.cn/ros/ubuntu buster InRelease [4,677 B] Ign:2 http://security.debian.org/debian-security buster/updates InRelease Err:3 http://security.debian.org/debian-security buster/updates Release 404 Not Found [IP: 2a04:4e42:65::644 80] Ign:4 http://deb.debian.org/debian buster InRelease Ign:5 http://deb.debian.org/debian buster-updates InRelease Err:6 http://deb.debian.org/debian buster Release 404 Not Found [IP: 199.232.150.132 80] Err:7 http://deb.debian.org/debian buster-updates Release 404 Not Found [IP: 199.232.150.132 80] Reading package lists... Done E: Release file for http://mirrors.ustc.edu.cn/ros/ubuntu/dists/buster/InRelease is not valid yet (invalid for another 2296d 12h 22min 52s). Updates for this repository will not be applied. E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: Target Packages (main/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (main/Contents-arm64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (main/Contents-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Packages (non-free/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Packages (non-free/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (non-free/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (non-free/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (non-free/Contents-arm64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (non-free/Contents-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
07-23
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值