Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm rather new to Ubuntu and I'm trying to run update-manager on Ubuntu.13.10. I get:

jacopo@jacopo-laptop:~$ update-manager 
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module> from ._gi import _API
ImportError: No module named 'gi._gi'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/bin/update-manager", line 28, in <module>
from gi.repository import Gtk
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 27, in <module>
from ._gi import _API
ImportError: No module named 'gi._gi'

As far as I have understood, this is a problem related to the fact that I should have python3.4 installed. I installed it in /usr/local/ lib, but I always get the same error. In this way I can't even upgrade to Ubuntu 14.04. Could someone help me? Thanks in advance!

Jacopo

share|improve this question

2 Answers 2

If you're trying to upgrade 13.10 to 14.04, try following these instructions. If you're just trying to update your current system from the command line, open a terminal and type the following:

sudo apt-get update
sudo apt-get dist-upgrade
share|improve this answer
    
Thanks. I had already tried but it didn't work. I tried once more now, getting, after apt-get update, the warning W: Failed to fetch bzip2:/var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_saucy-update‌​s_main_source_Sources Hash Sum mismatch –  user291925 Jun 9 at 14:22
    
K - you have a problem with the update sources. I've seen several threads about how to fix that The following link seems to be a good match for your question askubuntu.com/questions/41605/… –  Charles Green Jun 9 at 14:28
    
Thanks! I tried, but I still get the same error when running update-manager –  user291925 Jun 9 at 15:12
    
K - that about exhausts my possibilities with out a more extensive web search. Good luck! –  Charles Green Jun 9 at 15:22
    
Thanks charles! ;) –  user291925 Jun 9 at 15:26

I have managed to solve this by copying apt_pkg.cpython-34m-i386-linux-gnu.so to /usr/lib/python3/dist-packages/ from another desktop running Ubuntu 14.04 LTS. I have tried almost all possibilities found over internet like, purging python installation and then reinstalling, cleaning broken upgrade files etc, but ended up with no success.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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