我最近添加了一个 PPA(我认为是为了将登录屏幕从 lightdm 更改为 mdm),从那时起我的软件中心就停止工作了。每当我打开它时,我都会收到“软件中心已关闭。重新启动?”消息。当我尝试使用软件中心从终端打开它时,它总是会出现以下消息:
(software-center:19724): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1947:11: Not using units is deprecated. Assuming 'px'.
(software-center:19724): Gtk-WARNING **: Failed to parse /usr/share/themes/mac-os-lion-theme/gtk-3.0/settings.ini: Key file contains line '/* ' which is not a key-value pair, group, or comment
2012-11-16 20:18:20,896 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-11-16 20:18:20,904 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2012-11-16 20:18:21,910 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2012-11-16 20:18:22,689 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2012-11-16 20:18:25,697 - softwarecenter.ui.gtk3.app - INFO - software-center-agent finished with status 0
2012-11-16 20:18:25,698 - softwarecenter.db.database - INFO - reopen() database
2012-11-16 20:18:25,698 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 243, in open
self._cache = apt.Cache(GtkMainIterationProgress())
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 102, in __init__
self.open(progress)
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 149, in open
self._list.read_main_list()
SystemError: E:Type ‘eb’ is not known on line 58 in source list /etc/apt/sources.list
2012-11-16 20:18:28,218 - softwarecenter.db.enquire - ERROR - _get_estimate_nr_apps_and_nr_pkgs failed
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/enquire.py", line 115, in _get_estimate_nr_apps_and_nr_pkgs
tmp_matches = enquire.get_mset(0, len(self.db), None, xfilter)
File "/usr/share/software-center/softwarecenter/db/appfilter.py", line 89, in __call__
if (not pkgname in self.cache and
File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 263, in __contains__
return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
Traceback (most recent call last):
File "/usr/bin/software-center", line 176, in <module>
app.run(args)
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1422, in run
self.show_available_packages(args)
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1352, in show_available_packages
self.view_manager.set_active_view(ViewPages.AVAILABLE)
File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 154, in set_active_view
view_widget.init_view()
File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 171, in init_view
self.apps_filter)
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 238, in __init__
self.build(desktopdir)
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 511, in build
self._build_homepage_view()
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 271, in _build_homepage_view
self._append_whats_new()
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 450, in _append_whats_new
whats_new_cat = self._update_whats_new_content()
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 439, in _update_whats_new_content
docs = whats_new_cat.get_documents(self.db)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 124, in get_documents
nonblocking_load=False)
File "/usr/share/software-center/softwarecenter/db/enquire.py", line 317, in set_query
self._blocking_perform_search()
File "/usr/share/software-center/softwarecenter/db/enquire.py", line 212, in _blocking_perform_search
matches = enquire.get_mset(0, self.limit, None, xfilter)
File "/usr/share/software-center/softwarecenter/db/appfilter.py", line 89, in __call__
if (not pkgname in self.cache and
File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 263, in __contains__
return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
答案1
也许你可以从终端运行sudo apt-get update
,sudo apt-get upgrade
看看软件中心是否有更新的版本可用,它又可以工作了……只是猜测
答案2
尝试删除 ppa,/etc/apt/sources.list 表示提供的源存在一些问题,打开 /etc/apt/sources.list 并删除与该 ppa 相关的所有条目,然后尝试使用终端打开软件中心。如果错误仍然存在,只需发送输出即可。