我正在尝试打开 Ubuntu 10.10 软件中心。但打不开。可能是什么问题?
如果我尝试从终端运行软件中心,我会收到以下错误:
kush@kus:~$ software-center
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/apt/aptcache.py", line 105, in open
self._cache = apt.Cache(GtkMainIterationProgress())
File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 88, in __init__
self.open(progress)
File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 130, in open
self._list.read_main_list()
SystemError: E:Type '<HTML><HEAD><TITLE>HTTP' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list
Traceback (most recent call last):
File "/usr/bin/software-center", line 90, in <module>
app = SoftwareCenterApp(datadir, xapian_base_path, options, args)
File "/usr/share/software-center/softwarecenter/app.py", line 316, in __init__
self.view_switcher = ViewSwitcher(self.view_manager, datadir, self.db, self.cache, self.icons)
File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 59, in __init__
store = ViewSwitcherList(view_manager, datadir, db, cache, icons)
File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 321, in __init__
self._update_channel_list()
File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 395, in _update_channel_list
self._update_channel_list_installed_view()
File "/usr/share/software-center/softwarecenter/view/viewswitcher.py", line 448, in _update_channel_list_installed_view
if (pkgname in self.cache and
File "/usr/share/software-center/softwarecenter/apt/aptcache.py", line 128, in __contains__
return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
答案1
我尝试使用 Medibuntu,但我的互联网出现了问题。原因是:Ubuntu 软件中心、Synaptic 软件包管理器和更新管理器已停止工作。
经过对互联网的一些研究后,发现问题出在互联网导致的 medibuntu 列表上。
有效的解决方案只是从位于以下位置的源列表中删除该文件:/etc/apt/sources.list.d