无法打开软件中心

无法打开软件中心

当我尝试打开软件中心时收到此消息并且无法打开,您能帮我找出错误吗?

jdash@ubuntu:~$ software-center
2013-01-22 18:38:08,149 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2013-01-22 18:38:08,152 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2013-01-22 18:38:08,395 - softwarecenter.config - WARNING - Could not read the config file '/home/jdash/.config/software-center/softwarecenter.cfg': File contains no section headers.
file: d, line: 1
u'Help on method triangular in module random:\n'
2013-01-22 18:38:08,396 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2013-01-22 18:38:08,487 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2013-01-22 18:38:08,738 - 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 440, in _parse_menu_tag
    l = self._parse_directory_tag(element)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 305, in _parse_directory_tag
    cp.read(fname)
  File "/usr/share/software-center/softwarecenter/db/update.py", line 535, in read
    RawConfigParser.read(self, filename)
  File "/usr/local/lib/python2.7/dist-packages/configparser.py", line 710, in read
    self._read(fp, filename)
  File "/usr/local/lib/python2.7/dist-packages/configparser.py", line 1093, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: d, line: 1
u'Help on method triangular in module random:\n'

这是文件 Mark 的内容:

[general]
maximized = False
size = 1200, 800
add_to_launcher = True
recommender_uuid = 
recommender_profile_id = 

答案1

发布文件的内容可能是一个好主意:

cat /home/jdash/.config/software-center/softwarecenter.cfg

您还可以尝试重命名该文件,并查看下次尝试打开时是否会重新创建它。为此,请从命令行运行以下命令:

mv /home/jdash/.config/software-center/softwarecenter.cfg /home/jdash/.config/software-center/softwarecenter.cfg.backup

如果这不起作用,那么您可以使用以下方法恢复更改:

mv /home/jdash/.config/software-center/softwarecenter.cfg.backup /home/jdash/.config/software-center/softwarecenter.cfg

您将回到起点,但值得一试。如果此方法无效,请发布文件内容。

答案2

您也可以尝试删除软件中心并重新安装:

sudo apt-get remove software-center

然后使用以下命令重新安装:

sudo apt-get install software-center

答案3

该文件的内容应如下所示:

[general]
maximized = False
size = 1088, 800
add_to_launcher = True
recommender_uuid = 
recommender_profile_id = 
accepted_tos = yes

[reviews]
username = jdash

如果你运行:

nano /home/jdash/.config/software-center/softwarecenter.cfg 并将上述内容粘贴 ctrl+shift+v到粘贴然后ctrl+x退出..确保保存,希望这会起作用

答案4

改用 synaptic 包管理器吗?

安装:sudo apt-get install synaptic

跑步:sudo synaptic

相关内容