当我尝试更新时,我得到了如下所示的内容。这是什么?我总是收到消息“/etc/host.conf:第 3 行:错误命令‘nospoof on’”

当我尝试更新时,我得到了如下所示的内容。这是什么?我总是收到消息“/etc/host.conf:第 3 行:错误命令‘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

答案1

这应该非常清楚。

/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.d/official-package-repositories.list。删除其中一个文件中的行……并且只删除其中一个文件中的行。或者找出正确的语法应该是什么。

/etc/apt/sources.list并且配置中的文件用于/etc/apt/sources.list.dUbuntu 从哪些存储库安装和更新软件包。

相关内容