如何修复安装 oracle virtual box 后 ubuntu 中出现的以下错误

如何修复安装 oracle virtual box 后 ubuntu 中出现的以下错误
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11-icons-hidpi (contrib/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11-icons-hidpi (contrib/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11-icons-hidpi (contrib/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target DEP-11-icons-hidpi (contrib/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:2
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target DEP-11-icons-hidpi (contrib/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:3
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Translations (contrib/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11 (contrib/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11 (contrib/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11-icons-small (contrib/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11-icons (contrib/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target DEP-11-icons-hidpi (contrib/dep11/[email protected]) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target CNF (contrib/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4
W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:4

答案1

W: Target CNF (contrib/cnf/Commands-all) is configured multiple times in 
/etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d
/virtualbox.list:4

这个错误的含义是virtualbox存储库在/etc/apt/sources.list.d/virtualbox.list文件下配置了多次。在你的例子中,它被配置了 4 次。

要纠正该问题,请使用:

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" |
sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt update

相关内容