可能重复:
软件中心打不开
我是 Linux 和 Ubuntu 的新手,没有软件中心我无法安装 GIMP。我之前查过如何修复它,它说要修复我的源列表,我照做了,但现在我在终端中收到一个新错误。
2012-08-14 15:29:08,941 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-08-14 15:29:08,954 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2012-08-14 15:29:09,407 - softwarecenter.ui.gtk3.app - INFO - building local database
2012-08-14 15:29:09,408 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2012-08-14 15:29:17,308 - softwarecenter.db.update - WARNING - Problem creating rebuild path '/var/cache/software-center/xapian_rb'.
2012-08-14 15:29:17,309 - softwarecenter.db.update - WARNING - Please check you have the relevant permissions.
2012-08-14 15:29:17,309 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2012-08-14 15:29:18,039 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2012-08-14 15:29:18,431 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2012-08-14 15:29:19,153 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
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 136, in init_view
SoftwarePane.init_view(self)
File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/softwarepane.py", line 215, in init_view
self.icons, self.show_ratings)
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appview.py", line 69, in __init__
self.helper = AppPropertiesHelper(db, cache, icons)
File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 109, in __init__
softwarecenter.paths.APP_INSTALL_PATH)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 255, in parse_applications_menu
category = self._parse_menu_tag(child)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 444, in _parse_menu_tag
query = self._parse_include_tag(element)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 402, in _parse_include_tag
xapian.Query.OP_AND)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 341, in _parse_and_or_not_tag
operator_elem, xapian.Query(), xapian.Query.OP_OR)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 385, in _parse_and_or_not_tag
q = self.db.xapian_parser.parse_query(s,
File "/usr/share/software-center/softwarecenter/db/database.py", line 174, in xapian_parser
xapian_parser = self._get_new_xapian_parser()
File "/usr/share/software-center/softwarecenter/db/database.py", line 200, in _get_new_xapian_parser
xapian_parser.set_database(self.xapiandb)
File "/usr/share/software-center/softwarecenter/db/database.py", line 166, in xapiandb
self._db_per_thread[thread_name] = self._get_new_xapiandb()
File "/usr/share/software-center/softwarecenter/db/database.py", line 179, in _get_new_xapiandb
xapiandb = xapian.Database(self._db_pathname)
File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 3666, in __init__
_xapian.Database_swiginit(self,_xapian.new_Database(*args))
xapian.DatabaseOpeningError: Couldn't detect type of database
我不知道如何修复这些错误,而且我在任何地方都找不到相关主题。请多多包涵,因为我才刚使用 Linux 两天 :/
如果你需要我的来源列表请告诉我
答案1
欢迎来到 Ubuntu 和 Linux 的世界。您的存储库可能存在问题。转到这个答案将存储库恢复到原来的状态。然后尝试重新启动软件中心。
如果仍然不起作用,您可以尝试重新安装 Ubuntu 软件中心。
为此,打开终端并运行以下命令:
sudo apt-get remove software-center
sudo apt-get autoremove software-center
然后
sudo apt-get update
sudo apt-get install software-center
至于 sources.list 权限为只读的问题,请尝试以下操作:
进入终端(快捷方式是Ctrl+ Alt+ t)或在破折号中查找它。
在其中输入:
gksudo nautilus
现在输入您的密码,您将以 root 身份登录。现在单击“文件系统”。现在单击文件夹“etc”,然后单击文件夹“apt”。现在右键单击文件“sources.list”。在弹出菜单中,单击“属性”。现在单击选项卡“权限”。按照图片所示设置您的权限,然后单击关闭。
现在,您可以编辑您的 sources.list。如果您住在美国,您可以使用它。如果不是,请仅将其用作参考,然后转到答案的第一部分。他是我的源列表。现在确保保存它。
现在再次尝试重新安装软件中心。
先告诉我它是否有效,然后我们再解决 Microsoft Eula。