当我输入 sudo apt-get update 时遇到问题
sudo apt-get update
Hit:1 http ://download .virtualbox.org/virtualbox/debian xenial InRelease
Hit:2 http ://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Hit:3 http ://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial InRelease
Hit:4 http ://ppa.launchpad.net/paolorotolo/android-studio/ubuntu xenial InRelease
Hit:5 http ://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease
Hit:6 http ://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Reading package lists... Done
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-i386/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_US) 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-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 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-i386/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_US) 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-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 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-i386/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_US) 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-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 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:5
W: Target Packages (contrib/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:5
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:5
W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:5
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:5
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:5
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:5
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:6
W: Target Packages (contrib/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:6
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:6
W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:6
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:6
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:6
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:6
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-i386/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_US) 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-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 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-i386/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_US) 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-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 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-i386/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_US) 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-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 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:5
W: Target Packages (contrib/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:5
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:5
W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:5
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:5
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:5
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:5
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:6
W: Target Packages (contrib/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:6
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:6
W: Target Translations (contrib/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/virtualbox.list:1 and /etc/apt/sources.list.d/virtualbox.list:6
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:6
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:6
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:6
你能帮助我解决这个问题吗?
答案1
这仅仅意味着您在同一个文件 (/etc/apt/sources.list.d/virtualbox.list) 中多次配置了相同的源。试试这个 -
cd /etc/apt/sources.list.d/
cp virtualbox.list ~/backup.list
cat virtualbox.list | sort -u >> ~/tmp.list
sudo cp ~/tmp.list virtualbox.list
sudo apt-get update
如果错误消失,您可以删除备份列表