当我尝试更新然后我得到的东西如下所示。它是什么? 我总是收到消息“/etc/host.conf:line 3:bad command`nospoof on’”

$ sudo apt-get update /etc/host.conf: line 3: bad command `nospoof on' /etc/host.conf: line 3: bad command `nospoof on' /etc/host.conf: line 3: bad command `nospoof on' /etc/host.conf: line 3: bad command `nospoof on' /etc/host.conf: line 3: bad command `nospoof on' /etc/host.conf: line 3: bad command `nospoof on' 0% [Working]/etc/host.conf: line 3: bad command `nospoof on' Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://dl.google.com/linux/chrome/deb stable Release Hit:3 http://in.archive.ubuntu.com/ubuntu artful InRelease Hit:4 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu artful InRelease Splitting up /var/lib/apt/lists/download.sublimetext.com_apt_stable_InRelease into data Fetched 229 kB in 3s (76.4 kB/s) Reading package lists... Done W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Translations (restricted/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list.d/official-package-repositories.list:5 W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target Packages (universe/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target Translations (universe/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target Translations (universe/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target DEP-11 (universe/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target DEP-11 (universe/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target DEP-11-icons (universe/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:14 and /etc/apt/sources.list.d/official-package-repositories.list:14 W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target Translations (multiverse/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target DEP-11 (multiverse/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:22 and /etc/apt/sources.list.d/official-package-repositories.list:22 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://download.sublimetext.com apt/stable/ InRelease: Splitting up /var/lib/apt/lists/download.sublimetext.com_apt_stable_InRelease into data and signature failed W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Translations (restricted/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target DEP-11 (restricted/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target DEP-11 (restricted/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target DEP-11-icons (restricted/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:31 and /etc/apt/sources.list.d/official-package-repositories.list:31 W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:32 and /etc/apt/sources.list.d/official-package-repositories.list:32 

那应该很清楚。

/etc/host.conf第3行中,您有一行包含非法内容。 您已经在某个时间点编辑了该文件。 通过在第3行中插入#作为第一个字符来最终将该行标记为注释,从而还原编辑。

安装17.10后,它在/etc/host.conf有以下内容:

 # The "order" line is only used by old versions of the C library. order hosts,bind multi on 

您可以将配置还原到此配置。

然后在/etc/apt/sources.list/etc/apt/sources.list中的文件中定义了很多行。 删除其中一个文件中的行..仅在其中一个文件中删除。 或者弄清楚正确的语法应该是什么。

/etc/apt/sources.list/etc/apt/sources.list中的/etc/apt/sources.list.d配置Ubuntu安装和更新软件包的存储库。