O centro de software está a falhar imediatamente no Ubuntu 12.04

1

Eu abri no terminal e recebi o seguinte erro:

2013-09-26 12:12:44,585 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2013-09-26 12:12:44,589 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2013-09-26 12:12:44,678 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2013-09-26 12:12:44,738 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2013-09-26 12:12:44,740 - 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 171, in init_view
    self.apps_filter)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 238, in __init__
    self.build(desktopdir)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 511, in build
    self._build_homepage_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 257, in _build_homepage_view
    self._append_banner_ads()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 372, in _append_banner_ads
    scagent.query_exhibits()
  File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 119, in query_exhibits
    lang=get_language(), series=self.distro.get_codename())
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 92, in get_codename
    self._distro_code_name = distro_info['CODENAME']
KeyError: 'CODENAME'

Alguém tem uma ideia sobre como abordar isso? Obrigado

    
por Haronious 26.09.2013 / 20:17

2 respostas

0

Tente desinstalar e reinstalar o centro de software.

Para desinstalar o Centro de Software:

sudo apt-get remove software-center

sudo apt-get autoremove software-center

Para reinstalar o Centro de Software:

sudo apt-get update

sudo apt-get install software-center
    
por RedHatcc 26.09.2013 / 21:03
0

Trabalhe para mim

$ diff -u /usr/share/software-center/softwarecenter/distro/__init__.py-201401020102 /usr/share/software-center/softwarecenter/distro/__init__.py
--- /usr/share/software-center/softwarecenter/distro/__init__.py-201401020102   2014-02-02 01:03:59.812302279 -0300
+++ /usr/share/software-center/softwarecenter/distro/__init__.py    2014-02-02 01:04:34.603927639 -0300
@@ -85,10 +85,8 @@
             return distrocode
         # normal behavior
         if not hasattr(self, "_distro_code_name"):
-            try:
-                distro_info = lsb_release.get_distro_information(True)
-            except:
-                distro_info = lsb_release.get_distro_information()
+            # lsb_release.get_distro_information(True) returns OS key instead of CODENAME
+            distro_info = lsb_release.get_distro_information()
             self._distro_code_name = distro_info['CODENAME']
         return self._distro_code_name
por simon 02.02.2014 / 05:07