Software Center in Ubuntu 12.04 crashes on startup
Recently the Software Center started crashing on startup. Initially I thought it was due to network issues, but after a further examination it turned out not to be the case.
Running it from the panel will not give you any feedback about why it crashes, so I executed it command line to see what is going on:
/usr/bin/software-center
That produced the following output:
2012-05-23 09:47:04,729 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2012-05-23 09:47:04,732 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2012-05-23 09:47:04,926 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2012-05-23 09:47:05,129 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 243, in open
self._cache = apt.Cache(GtkMainIterationProgress())
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 102, in __init__
self.open(progress)
File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 145, in open
self._cache = apt_pkg.Cache(progress)
SystemError: E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise_multiverse_binary-amd64_Packages, E:The package lists or status file could not be parsed or opened.
2012-05-23 09:47:06,770 - 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 263, in __contains__
return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
Traceback (most recent call last):
File "./software-center", line 176, in
app.run(args)
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1343, in run
self.show_available_packages(args)
File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1273, in show_available_packages
self.view_manager.set_active_view(ViewPages.AVAILABLE)
File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 149, in set_active_view
view_widget.init_view()
File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 168, in init_view
self.apps_filter)
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 240, in __init__
self.build(desktopdir)
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 491, in build
self._build_homepage_view()
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 266, in _build_homepage_view
self._append_whats_new()
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 430, in _append_whats_new
whats_new_cat = self._update_whats_new_content()
File "/usr/share/software-center/softwarecenter/ui/gtk3/views/catview_gtk.py", line 419, in _update_whats_new_content
docs = whats_new_cat.get_documents(self.db)
File "/usr/share/software-center/softwarecenter/db/categories.py", line 124, in get_documents
nonblocking_load=False)
File "/usr/share/software-center/softwarecenter/db/enquire.py", line 317, in set_query
self._blocking_perform_search()
File "/usr/share/software-center/softwarecenter/db/enquire.py", line 212, 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 263, in __contains__
return self._cache.__contains__(k)
AttributeError: 'NoneType' object has no attribute '__contains__'
As you can see in the SystemError part, it seems to have an issue with the one of the repository lists in /var/lib/apt/lists/, so the natural solution as this post suggests is to remove the one it is complaing about or better yet, remove all and run apt-get update to create them again:
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
You should be good to go…
5 Comments to Software Center in Ubuntu 12.04 crashes on startup
Leave a comment
Search
Archive
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Apr | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
Recent Comments
- Olivier on Dynamic Port Forwarding with SOCKS over SSH
- Ld7 on How to connect your Android phone to Ubuntu to do development, testing, installations or tethering
- get more Info on How to get Picasa images using the Image Picker on Android devices running any OS version
- Casper on How to detect a user pan/touch/drag on Android Map v2
- Install SSH as socks proxy for dynamic port forwarding | Steve Constine on Dynamic Port Forwarding with SOCKS over SSH
Categories
Blogroll
Online Tools
Other
BLOG ARCHIVE
- April 2013 (1)
- November 2012 (2)
- August 2012 (1)
- May 2012 (1)
- March 2012 (1)
- November 2011 (1)
- August 2011 (1)
- April 2011 (1)
- January 2011 (2)
- September 2010 (1)
- August 2010 (2)
- July 2010 (2)
- June 2010 (2)
- May 2010 (1)
- January 2010 (2)
- December 2009 (2)
- November 2009 (3)
- October 2009 (1)
- September 2009 (3)
- July 2009 (1)
- May 2009 (1)
- March 2009 (1)
- February 2009 (2)
- January 2009 (2)
- December 2008 (1)
- November 2008 (4)
- October 2008 (5)
Excellent post. Just what I needed.
Thank you, solved my problem..
perfect, thanks!
Works ! Thanks
Oh thank you! you saved my day!