“SystemError:E:语法错误 /etc/apt/apt.conf.d/70debconf:4:文件末尾有多余的垃圾”导致包管理器崩溃

“SystemError:E:语法错误 /etc/apt/apt.conf.d/70debconf:4:文件末尾有多余的垃圾”导致包管理器崩溃

我在使用 ubuntu 软件中心时遇到了问题。当我尝试从 dock 启动它时,图标闪烁然后关闭。如果我尝试从终端启动它,我会收到此消息。

gksarkis@ubuntu:~$ gksudo software-center

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
  File "/usr/bin/software-center", line 44, in <module>
    from softwarecenter.utils import ExecutionTime
  File "/usr/share/software-center/softwarecenter/utils.py", line 682, in <module>
    from softwarecenter.db.pkginfo import get_pkg_info
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 2, in <module>
    from debfile import DebFileApplication
  File "/usr/share/software-center/softwarecenter/db/debfile.py", line 21, in <module>
    from apt import Cache
  File "/usr/lib/python2.7/dist-packages/apt/__init__.py", line 35, in <module>
    apt_pkg.init()
SystemError: E:Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk at end of file
sarkis@ubuntu:~$ 

另外,当我尝试从终端安装软件时,我收到此消息。

sarkis@ubuntu:~$ sudo apt-get cheese
[sudo] password for sarkis: 
E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk at end of file
sarkis@ubuntu:~$ 

我应该怎么办?

在此先感谢您的帮助。

*顶部栏有一个红色按钮,显示:发生错误,请从右键菜单运行包管理器或在终端中运行 apt-get 查看错误所在。错误消息为“未知错误”:“(E:语法错误 /etc/apt/apt.conf.d/70debconf:4:文件末尾有多余的垃圾)”

http://pastebin.ubuntu.com/1453196/

答案1

命令行错误:

sudo apt-get install <application> 

sudo apt-get remove <application>

我建议尝试使用 synaptic 重新安装软件中心

相关内容