![Ubuntu 软件中心无法打开](https://linux22.com/image/979076/Ubuntu%20%E8%BD%AF%E4%BB%B6%E4%B8%AD%E5%BF%83%E6%97%A0%E6%B3%95%E6%89%93%E5%BC%80.png)
当我尝试通过终端打开 Ubuntu 软件中心时显示以下内容:
$ software-center
2015-03-03 13:07:01,990 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2015-03-03 13:07:02,224 - softwarecenter.ui.gtk3.app - INFO - building local database
2015-03-03 13:07:02,225 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
Traceback (most recent call last):
File "/usr/bin/software-center", line 130, in <module>
app = SoftwareCenterAppGtk3(options, args)
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 313, in __init__
self._rebuild_and_reopen_local_db(pathname)
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 532, in _rebuild_and_reopen_local_db
rebuild_database(pathname, debian_sources, appstream_sources)
File "/usr/share/software-center/softwarecenter/db/update.py", line 1148, in rebuild_database
cache.open()
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 107, in __init__
self.open(progress)
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 155, in open
self._list.read_main_list()
SystemError: E:Type ‘WEW’ is not known on line 3 in source list /etc/apt/sources.list.d/mono-xamarin.list
我记得我意外地输入了“WEW”,但我不确定如何改变这一点。
答案1
/etc/apt/sources.list.d/mono-xamarin.list
第 3 行有一个格式错误的行。
最好的解决方案是使用编辑器打开该文件并查找第 3 行。然后您可以注释掉该行。只需#
在该行的第一个字符中添加一个 - 字符即可。
然后再次运行software-center
。