1

Any time I try to run the Ubuntu software center it immediately crashes. I go to terminal and type in 'software-center' and this is the results I get. Any help.

2014-04-22 09:29:28,526 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2014-04-22 09:29:28,987 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2014-04-22 09:29:28,990 - softwarecenter.plugin - INFO - activating plugin '<module 'webapps_activation' from '/usr/share/software-center/softwarecenter/plugins/webapps_activation.pyc'>'
2014-04-22 09:29:28,994 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2014-04-22 09:29:28,994 - root - ERROR - Could not find any typelib for LaunchpadIntegration
2014-04-22 09:29:29,035 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2014-04-22 09:29:29,604 - softwarecenter.backend.reviews - WARNING - error creating bsddb: '(22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')' (corrupted?)
2014-04-22 09:29:29,605 - softwarecenter.backend.reviews - ERROR - trying to repair DB failed
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/backend/reviews/__init__.py", line 358, in _save_review_stats_cache_blocking
    self._dump_bsddbm_for_unity(outfile, outdir)
  File "/usr/share/software-center/softwarecenter/backend/reviews/__init__.py", line 377, in _dump_bsddbm_for_unity
    0600)
DBInvalidArgError: (22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:535: Warning: Source ID 68 was not found when attempting to remove it
  return super(MainContext, self).iteration(may_block)
Traceback (most recent call last):
  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 'sudo' is not known on line 57 in source list /etc/apt/sources.list
2014-04-22 09:29:30,054 - softwarecenter.db.enquire - ERROR - _get_estimate_nr_apps_and_nr_pkgs failed
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/enquire.py", line 115, in _get_estimate_nr_apps_and_nr_pkgs
    tmp_matches = enquire.get_mset(0, len(self.db), None, xfilter)
  File "/usr/share/software-center/softwarecenter/db/appfilter.py", line 89, in __call__
    if (not pkgname in self.cache and
  File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 281, in __contains__
    return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
Traceback (most recent call last):
  File "/usr/bin/software-center", line 183, in <module>
    app.run(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1375, in run
    self.show_available_packages(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1313, in show_available_packages
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 150, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 227, in init_view
    self.cache, self.db, self.icons, self.apps_filter)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 80, in __init__
    self.build()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 326, in build
    self._build_homepage_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 121, in _build_homepage_view
    self._append_whats_new()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 255, in _append_whats_new
    whats_new_cat = self._update_whats_new_content()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py", line 240, in _update_whats_new_content
    docs = whats_new_cat.get_documents(self.db)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 131, in get_documents
    nonblocking_load=False)
  File "/usr/share/software-center/softwarecenter/db/enquire.py", line 330, in set_query
    self._blocking_perform_search()
  File "/usr/share/software-center/softwarecenter/db/enquire.py", line 225, in _blocking_perform_search
    matches = enquire.get_mset(0, self.limit, None, xfilter)
  File "/usr/share/software-center/softwarecenter/db/appfilter.py", line 89, in __call__
    if (not pkgname in self.cache and
  File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 281, in __contains__
    return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
Mitch
  • 107,631

1 Answers1

1

Try re-installing Software-center:

sudo apt-get purge software-center
sudo apt-get install software-center

And its a Bad idea but see if software-center is able to run as root

gksudo software-center

PS: Running software-center as root is highly not recommended, check this Link for more info.

If you dont have gksudo installed then install it using

sudo apt-get install gksudo
Back.Slash
  • 2,166
  • 2
  • 17
  • 22
  • I tried rm~/.cache/software-center and was told that it cannot be removed. is a directory.

    Also Tried What you suggested Back.Slash and it did not work... when I tried the 'sudo apt-get install software-installer' i got unable to locate package software-installer

    – daddyguru Apr 22 '14 at 15:14
  • my bad its software-center not software-installer (edited the answer). Also for removing try rm -r ~/.cache/software-center – Back.Slash Apr 22 '14 at 16:20
  • I am still unable to run it... i removed the cache from software-center first but that didn't help... so i removed software center then tried to reinstall with the sudo apt-get install software-center and it still isn't running i get this return: – daddyguru Apr 22 '14 at 16:27
  • SystemError: E:Type 'sudo' is not known on line 57 in source list /etc/apt/sources.list – daddyguru Apr 22 '14 at 16:31
  • I get this error among other errors, but i think this is the main error – daddyguru Apr 22 '14 at 16:31
  • Looks like you have a malformed entry on line 57 in /etc/apt/sources.list. do sudo gedit /etc/apt/sources.list and post content of line 57, Also check http://askubuntu.com/questions/96967/how-do-i-fix-this-etype-is-not-known-on-line-in-source-list-update – Back.Slash Apr 22 '14 at 16:36
  • Also can you try sudo ls and reply is its working without any error? – Back.Slash Apr 22 '14 at 16:36
  • just type in 'sudo ls'? I did that and it brought up a few directories like i typed in 'dir' – daddyguru Apr 22 '14 at 16:39
  • therefore sudo is working fine – Back.Slash Apr 22 '14 at 16:40
  • check whats written on line 57 /etc/apt/sources.list – Back.Slash Apr 22 '14 at 16:41
  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 249AD24C – daddyguru Apr 22 '14 at 16:44
  • it is saying that installed packages have unmet dependencies in my toolbar – daddyguru Apr 22 '14 at 16:44
  • comment line 57 by adding # in front of the line, and do a sudo apt-get update and then try running software-center from terminal – Back.Slash Apr 22 '14 at 16:44
  • any way of figuring that out? – daddyguru Apr 22 '14 at 16:45
  • still closing on me – daddyguru Apr 22 '14 at 16:47
  • same error? did you save the /etc/apt/sources.list you need to edit as root using sudo gedit /etc/apt/sources.list to save changes – Back.Slash Apr 22 '14 at 16:48
  • Ok I got it fixed. Thanks for all your help!

    I fixed the file by commenting on that line then saved it. (Which I did earlier, but I was missing a space between the # and the sudo). I then 'sudo apt-get purge software-center' to remove software-center. After, I reinstalled software center by running 'sudo apt-get install software-center'. Finally I ran 'sudo apt-get update'. Then opened software center.

    Seems to be working well now!

    – daddyguru Apr 22 '14 at 16:55
  • no problem, just mark the question as answered :) – Back.Slash Apr 22 '14 at 16:58
  • how? Sorry I am new and don't know – daddyguru Apr 22 '14 at 16:59