使用apt时如何解决“文件末尾的额外垃圾”?

我正在尝试为来宾虚拟机配置一些代理,现在我得到:

sudo apt-get update E: Syntax error /etc/apt/apt.conf.d/95proxy:4: Extra junk at end of file 

该文件的内容是:

 cat /etc/apt/apt.conf.d/95proxy Acquire::http::proxy "http://10.0.0.60:3128/" Acquire::ftp::proxy "http://10.0.0.60:3128/" Acquire::https::proxy "http://10.0.0.60:3128/" 

问题是我没有为配置文件设置结束分号。 它应该如下所示:

 Acquire::http::proxy "http://10.0.0.60:3128/"; Acquire::ftp::proxy "http://10.0.0.60:3128/"; Acquire::https::proxy "http://10.0.0.60:3128/"; 

阅读手册页:

每行的forms为APT :: Get :: Assume-Yes“true”;。 引号和尾随分号是必需的

如果多行使用带有花键制动器的范围,它应该看起来:

 APT { Get { Assume-Yes "true"; Fix-Broken "true"; }; };