1

My software center crashes immediately when I try to open it. In the terminal it looks like this:

software-center
2014-08-29 17:44:29,262 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2014-08-29 17:44:29,262 - root - ERROR - Could not find any typelib for Gst
2014-08-29 17:44:29,324 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2014-08-29 17:44:29,329 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2014-08-29 17:44:29,489 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2014-08-29 17:44:29,559 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
2014-08-29 17:44:29,561 - 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'

Remark: A while before this happened, I had a problem where some updates failed, as discussed here. There and elsewhere, people suggested to change 'luna' to 'precise' for some ppas. I did that, not by editing files but via the software center. I suspect that the issue with the software center is due to that. However, changing back 'precise' to 'luna' in /etc/apt/sources.list.d/elementary.list and /etc/apt/sources.list.d/patches.list does not make the software-center work again but brings back the updating problem.

migrated from askubuntu.com Aug 30 '14 at 15:17

This question came from our site for Ubuntu users and developers.

  • Hey I'm having the same problem. Did you get a solution so far. – muaazsaleem Sep 9 '14 at 12:39
  • No, nobody seems to have a clue. – Heiko Sep 9 '14 at 15:34
3

Solved it by doing the following:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install --reinstall base-files=6.5ubuntu6.7+elementary8~ubuntu0.2.1

I'm no expert, so I can't explain it, but I found the solution here. Seems to be related to /etc/os-release and /etc/lsb-release. In my case these files looked like this before I tried the above mentioned solution:

cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.5 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.5 LTS)"
VERSION_ID="12.04"

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"

And they looked like this afterwards:

cat /etc/os-release
NAME="elementary OS"
VERSION="0.2.1 Luna"
ID="elementary OS"
ID_LIKE=ubuntu
PRETTY_NAME="elementary OS Luna"
VERSION_ID="0.2.1"

cat /etc/lsb-release
DISTRIB_ID="elementary OS"
DISTRIB_RELEASE=0.2.1
DISTRIB_CODENAME=luna
DISTRIB_DESCRIPTION="elementary OS Luna"

In addition it solved another problem I had, namely to add ppas!

  • This also solves another problem of add-apt-repository failing with the message could not find a distribution template – Philzen Oct 2 '14 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.