所以我正在运行 WSL 2,并通过 windows 商店获得了 ubuntu 20.04 LTS 安装。
我已经下载了一些程序,例如(Python 3 et el)。我也知道我必须让我的系统保持最新。虽然我没有接触内核升级的东西。我一直在使用命令 sudo apt-update 然后是 sudo apt-upgrade。
在这些消息开始出现之前的前两到三个月,这很好。
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/pgdg.list:1 and /etc/apt/sources.list.d/pgdg.list:2
Run Code Online (Sandbox Code Playgroud)
现在有人可以解释一下实际发生了什么,为什么要多次配置它们?这些是备份吗?我该如何整理多个日志?这样做安全吗?这里有点困惑。感谢并欢迎所有反馈。先谢谢了。
大编辑:
shanzem@Shanzem-Laptop:~$ cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
Run Code Online (Sandbox Code Playgroud)
多么奇怪!将注释掉第 2 行!将发布结果。
问题解决了
正如this one和this one等其他答案中所解释的,您的问题是您的 source.list 文件之一中的重复源。
错误指出问题出在文件上 /etc/apt/sources.list.d/pgdg.list
该错误还指出重复项列在文件的第 1 行和第 2 行。
您可以使用以下命令来编辑文件:
sudo nano /etc/apt/sources.list.d/pgdg.list
Run Code Online (Sandbox Code Playgroud)
使用此文本编辑器模式删除重复行。
如果线1和线2是相同的,删除一个两行的,然后按CTRL+o保存文件,然后按下CTRL+x退出纳米。
编辑文件后,运行以下命令来更新您的软件包列表并将您的软件升级(更新)到最新版本:
sudo apt update
sudo apt upgrade
Run Code Online (Sandbox Code Playgroud)
如果这两行不相同,请编辑您的问题并发布您的/etc/apt/sources.list.d/pgdg.list文件内容,以便我提供更详细的说明。
| 归档时间: |
|
| 查看次数: |
420 次 |
| 最近记录: |