Ubuntu 15.10 软件中心在启动后立即关闭

Ubuntu 15.10 软件中心在启动后立即关闭

我刚刚安装了 Ubuntu 15.10(顺便说一句,我对 Linux 完全陌生)。软件中心以及 ubuntu 更新程序应用程序似乎在打开后立即关闭。终端在启动软件中心时出现以下反应:

2015-12-06 19:55:36,309 - softwarecenter.backend.zeitgeist_logger - WARNING - Support for Zeitgeist disabled
2015-12-06 19:55:36,358 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2015-12-06 19:55:36,361 - softwarecenter.db.database - ERROR - failed to add apt-xapian-index
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/database.py", line 194, in _get_new_xapiandb
    softwarecenter.paths.APT_XAPIAN_INDEX_DB_PATH)
  File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 3667, in __init__
    _xapian.Database_swiginit(self,_xapian.new_Database(*args))
DatabaseOpeningError: Couldn't stat '/var/lib/apt-xapian-index/index' (No such file or directory)
2015-12-06 19:55:36,837 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2015-12-06 19:55:36,840 - softwarecenter.plugin - INFO - activating plugin '<module 'webapps_activation' from '/usr/share/software-center/softwarecenter/plugins/webapps_activation.pyc'>'
2015-12-06 19:55:36,878 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open
    self._cache = apt.Cache(progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 113, in __init__
    self.open(progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 168, in open
    self._list.read_main_list()
SystemError: E:Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/spotify.list
/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py:190: Warning: Source ID 70 was not found when attempting to remove it
  Gtk.main_iteration()
2015-12-06 19:55:37,523 - 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 281, 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 183, in <module>
    app.run(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1378, in run
    self.show_available_packages(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1316, in show_available_packages
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 150, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 227, in init_view
    self.cache, self.db, self.icons, self.apps_filter)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 80, in __init__
    self.build()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 326, in build
    self._build_homepage_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 121, in _build_homepage_view
    self._append_whats_new()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 255, in _append_whats_new
    whats_new_cat = self._update_whats_new_content()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 240, in _update_whats_new_content
    docs = whats_new_cat.get_documents(self.db)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 131, in get_documents
    nonblocking_load=False)
  File "/usr/share/software-center/softwarecenter/db/enquire.py", line 330, in set_query
    self._blocking_perform_search()
  File "/usr/share/software-center/softwarecenter/db/enquire.py", line 225, 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 281, in __contains__
    return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'

对于我这样的人来说,这信息量太大了。有人能解释一下我的机器发生了什么吗?

附言:在尝试打开软件更新程序之前,我尝试下载 Spotify 软件。它失败了,我不知道为什么。也许它对你看到的内容起了作用...

谢谢!Kaiser

答案1

/etc/apt/sources.list.d/spotify.list使用如下命令打开文件:

gksudo gedit /etc/apt/sources.list.d/spotify.list

清除文件中当前的行(至少是以 sudo 开头的行)。

添加此内容:

deb http://repository.spotify.com stable non-free

运行(这将信任 spotify 软件源):

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886

然后运行(这将更新可用软件列表):

sudo apt-get update

最后,运行(这将使用命令行安装 spotify。此时,我认为您应该有一个可以运行的软件中心,您也可以通过它执行此操作):

sudo apt-get install spotify-client

相关内容