我是超级菜鸟,使用 14.10。当我尝试通过命令行执行任何操作时,响应总是类似以下内容:
E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk after value
我想要做的就是下载 VLC 和 Popcorn Time。
为了安装 VLC,我尝试:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vlc
我尝试后:
$ sudo apt-get update
E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk after value
/etc/apt/apt.conf.d/70debconf
文件内容:
$ cat /etc/apt/apt.conf.d/70debconf
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
apt::cache-limit "100000000" APT::Cache-Limit "100000000";
$ sudo apt-get update
E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk after value
答案1
您想在哪里增加缓存大小?
/etc/apt/apt.conf.d/70debconf
在您喜欢的文本编辑器中打开文件:
sudo nano /etc/apt/apt.conf.d/70debconf
;
并在行尾添加分号( ):
APT::Cache-Limit "100000000"
使其看起来像:
APT::Cache-Limit "100000000";
一体
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
APT::Cache-Limit "100000000";
您可以删除该apt::cache-limit "100000000"
行,因为APT::Cache-Limit "100000000";
它是正确的格式。
从man apt-conf
:
APT::Get::Assume-Yes "true";尾随的分号是必需的,引号是可选的。