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.

"A problem occurred while checking for updates" I have noticed the red circle with white line for at least a week. Not sure if it is due to a python version I changed to or and update that was cut in the middle. Bottom line I can not go into my repositories and more. Right click on the red circle with the light shows some options, like install all updates,but none respond.

I did look into previous remarks about this problem, but seems none have resolved this issue yet.

here is the output from doing

sudo apt-get -f install 

E: Sub-process /usr/bin/dpkg returned an error code (1)
eyal@eyal:~$ sudo apt-get -f install
Reading package lists...Done
eyal@eyal:~$ sudo apt-get -f install
Reading package lists...Done
Building dependency tree

Reading state information...Done
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ipython (0.10.2-1) ...

Traceback (most recent call last):

File "/usr/bin/pycompile", line 36, in <module>

from debpython.version import SUPPORTED, debsorted, vrepr, \

File "/usr/share/python/debpython/version.py", line 24, in <module>

from ConfigParser import SafeConfigParser

ImportError: No module named ConfigParser

dpkg: error processing ipython (--configure):

subprocess installed post-installation script returned error exit status 1
No apport writen becaouse MaxReports is reached already

Errors were encountered while processing:
ipython

I did an update and try to install the packages:

Reading package lists...
  Building dependency tree...
  Reading state information...
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  3 not fully installed or removed.
  After this operation, 0 B of additional disk space will be used.
  Setting up gconf2 (3.2.3-0ubuntu0.1) ...
  Traceback (most recent call last):
  File "/usr/sbin/gconf-schemas", line 120, in <module>
    trim(os.path.join(defaults_dest,"%gconf-tree.xml"), get_valid_languages())
  File "/usr/sbin/gconf-schemas", line 18, in get_valid_languages
    langs.add(l.split('_')[0])
 TypeError: Type str doesn't support the buffer API
 dpkg: error processing gconf2 (--configure):
 subprocess installed post-installation script returned error exit status 1
 Setting up ipython (0.10.2-1) ...
 Traceback (most recent call last):
  File "/usr/bin/pycompile", line 36, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
 ImportError: No module named ConfigParser
 dpkg: error processing ipython (--configure):
 subprocess installed post-installation script returned error exit status 1
 dpkg: dependency problems prevent configuration of compiz-plugins-main-default:
 compiz-plugins-main-default depends on gconf2 (>= 2.28.1-2); however:
  Package gconf2 is not configured yet.
 dpkg: error processing compiz-plugins-main-default (--configure):
 dependency problems - leaving unconfigured
 Errors were encountered while processing:
 gconf2
 ipython
 compiz-plugins-main-default
 E: sub-process /usr/bin/dpkg returned an error code(1)

    E: Sub-process /usr/bin/dpkg returned an error code (1)

Seems the main problem is coming from: Errors were encountered while processing: gconf2 ipython

sudo dpkg --configure gconf2
[sudoo] password for eyal:
setting up conf2 (3.2.3-0ubuntu0.1) ...
Trackback (most recent call last):
 File '/usr/sbin/gconf-schemas", line 120, in <module>
   trim (os.path.join(defaults_dest, "%gconf-tree.xml")
 File '/usr/sbin/gconf-schemas", line 18, in get_valid_languages
 langs.add(l.split('_')[0])
TypeError: type str dosen't support the buffer API
dpkg error: error processing gconf2(--configure):
 subprocess installed post-instalation script returned error exit satus 1
Erros were encountered while processing:
gconf2
share|improve this question
    
can you post the output of sudo apt-get -f install? If it tries to repair something and you are unsure, please choose "no" and post the output by editing your posting. –  Michael K Jan 11 '12 at 9:59
    
Hi Michael K, I added in the main body message the output. Although it is complaining about the ipython the problems were prior to trying to install ipython.. –  Eyal Saiet Jan 11 '12 at 18:59
    
Try to run #dpkg --configure to see if dpkg can finish installing the package. If it is impossible, try running #dpkg --purge to attempt to roll back to the previous version. All else failing, try #dpkg --audit to see what dpkg would suggest. –  Huckle Jan 11 '12 at 19:58
    
How would I add long comments? Basically I am not sure what output an I looking if I do the above command. I did go ahead and do sudo apt-get update followed by sudo apt-get -f install saying Errors were encountered while processing: gconf2, ipython –  Eyal Saiet Jan 12 '12 at 6:29
    
you can edit your posting to add further information.Please also add the complete output during the steps Huckle suggested. –  Michael K Jan 12 '12 at 8:18

4 Answers 4

My mint had problem with:

    Errors were encountered while processing:
       python-m2crypto
       python-sqlite
       python-urlgrabber
       python-yaml
       python-rpm
       osc
       python-iniparse
    E: Sub-process /usr/bin/dpkg returned an error code (1)

So I check with :

$ sudo dpkg --audit
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 python-yaml          YAML parser and emitter for Python
 python-m2crypto      a crypto and SSL toolkit for Python
 python-sqlite        Python interface to SQLite 2
 osc                  OpenSUSE (buildsystem) commander
 python-rpm           Python bindings for RPM
 python-iniparse      Module to access and modify configuration data in INI fil
 python-urlgrabber    A high-level cross-protocol url-grabber

I solved the issue the following way:

$ sudo apt-get download python-minimal
$ sudo dpkg -i python-minimal_2.7.5-5ubuntu1_amd64.deb
$ sudo apt-get -f install
Setting up python-m2crypto (0.20.1+dfsg1-1.1ubuntu1) ...
Setting up python-sqlite (1.0.1-8) ...
Setting up python-urlgrabber (3.9.1-4ubuntu1) ...
Setting up python-yaml (3.10-1) ...
Setting up python-rpm (4.9.0-7ubuntu0.1) ...
Setting up osc (0.132.4-1) ...
Setting up python-iniparse (0.4-2.1) ...
$ sudo dpkg --audit output blank

Solved!

share|improve this answer

I don't know why but I bumped into the similar issue after a regular system update (Ubuntu 13.10, amd64). I spent a lot of time on Googling but nothing helped me. The default python in the system is version 2.7. I found out the issue was because the /usr/share/python/debpython directory didn't exist after update.

I solved the issue the following way:

apt-get download python-minimal
sudo dpkg -i python-minimal_2.7.5-5ubuntu1_amd64.deb
sudo apt-get -f install

and for final check that everything is ok

sudo dpkg --audit
share|improve this answer

Sometimes a corrupt installation package can corrupt your package management system leaving your Linux unable to install or on remove any packages (Software). Here is the message error I got from apt-get after trying to install ndas-admin for Ubuntu.

$sudo apt-get install mplayer (or any package) Reading package lists… Done Building dependency tree
Reading state information… Done E: The package ndas-admin needs to be reinstalled, but I can’t find an archive for it. (this is the error)

I tried : $ sudo apt-get install -f , to try to fix the problem but got the same error. The only option I had was to edit the dpkg status file manually.

$ sudo gedit /var/lib/dpkg/status    (if you prefer you can use vi instead of gedit)
Locate the corrupt package, and remove the whole block of information about it and save the file. Mine looked like this:

Package: ndas-admin
Status: deinstall reinstreq half-configured
Priority: extra
Section: alien
Installed-Size: 100
Maintainer: root <root@ubuntu510>
Architecture: i386
Version: 1.0.2-24
Depends: libc6 (>= 2.3.4-1)
Description: Administration toosl for XIMETA,Inc NDAS device driver for Linux operating system
 ndas-admin – This program allows the user to register/enable/disable/unregister the XIMETA NDAS hard disk.
 .
 (Converted from a rpm package by alien version 8.53.)

Fixed. Hope this helps someone else.

share|improve this answer
    
You seem to have used code highlighting for some things that aren't code, and not used it for some things that are code. If you want to highlight part of a line as code, you can surround it in tickmarks (``, or Shift+~ on US-English keyboards). I would edit this, but I'm not sure how you want it formatted. –  Eliah Kagan May 30 '12 at 16:13

I got exactly the same problem you should check the default python version your system point to. Some piece of software force me to use python 3.2 so I manually switch python version.

sudo ln -s /usr/bin/python3.2 /usr/bin/python

Then I ran into the problem you decribe here I switch it back to 2.7 then rerun the configuration steps.

sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
sudo dpkg --configure gconf2

And it goes flawlessly ... I hope it'll help.

share|improve this answer
    
It must be that. The errors are about python unable to import ConfigParser, and this makes sense as it is now called configparser (no capitalization) in python3.x. –  Javier Rivera Feb 15 '12 at 14:57

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.