Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 5274  / 2 Years ago, wed, december 29, 2021, 1:09:17

I was trying to access Settings in Update Manager to setup automatic updates. But the Settings Dialog does not pop up. Cannot Access Software Sources from the Ubuntu Software Center>Edit>Software Sources... either. When I try to run software sources from the terminal I get the following error.



$ sudo software-properties-gtk
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 26, in <module>
gi.require_version('Gtk', '2.0')
File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 46, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available


I understand that the package is looking for GTK namespace and requires Gtk version 2.0
Trying to check what version of GTK is installed, I run the following and get



$ apt-cache showpkg libgtk2.0-0 | more
Package: libgtk2.0-0
Versions:
2.24.4-0ubuntu2 (/var/lib/apt/lists/Ubuntu%2011.04%20%5fNatty%20Narwhal%5f%20-%2
0Release%20i386%20(20110426)_dists_natty_main_binary-i386_Packages) (/var/lib/ap
t/lists/us.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages) (/va
r/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/Ubuntu%2011.04%20%5fNatty%20Narwhal%5f
%20-%20Release%20i386%20(20110426)_dists_natty_main_binary-i386_Packages
MD5: 3ed10be69b676a812afff2c7fdaa4017


How do I get software sources to run?



Update:

Found a related question here.I have python2.5 installed, but haven't set up a symbolic link to it, and the above log mentions python2.7


More From » 11.04

 Answers
1

I had the same problem and finally solved it! Just for the record, reinstalling the packages as stated above did not help. This is what I did.



According to the pygi docs, if you type



python -c 'from gi.repository import Gtk; print Gtk'


you should get



<gi.module.DynamicModule 'Gtk' from '/usr/lib/girepository-1.0/Gtk-3.0.typelib'>


(Gtk-2.0 depending on which version you have installed. I have Gtk-2.0.)



This gave me the clue. The Gtk typelib was in fact there but I suspected there may be another girepository-1.0 directory in my filesystem that was taking precedence. Using the locate command I found it in /usr/local/lib along with several libgirepository-1.0* libs. This directory did not contain the Gtk typelib. So I simply removed it along with the libraries and the problem is now solved.


[#44634] Thursday, December 30, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
thellfi

Total Points: 222
Total Questions: 103
Total Answers: 123

Location: Palau
Member since Mon, Aug 16, 2021
3 Years ago
thellfi questions
;