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 accidentally broke libbglib2.0-0 by trying to install a newer Debian package version. Now I can't do anything.

Here is what I did:

sudo dpkg -i libglib*.deb
(Reading database ... 503232 files and directories currently installed.)
Preparing to replace libglib2.0-0 2.30.0-0ubuntu4 (using libglib2.0-0_2.33.12+really2.32.4-5_amd64.deb) ...
De-configuring libglib2.0-0:i386 ...
Unpacking replacement libglib2.0-0 ...
dpkg: error processing libglib2.0-0 (--install):
 libglib2.0-0:amd64 2.33.12+really2.32.4-5 cannot be configured because libglib2.0-0:i386 is in a different version (2.30.0-0ubuntu4)
dpkg: error processing libglib2.0-0:i386 (--install):
 libglib2.0-0:i386 2.30.0-0ubuntu4 cannot be configured because libglib2.0-0:amd64 is in a different version (2.33.12+really2.32.4-5)
Errors were encountered while processing:
 libglib2.0-0
 libglib2.0-0:i386

--

sudo apt-get -f install
Readingpackage lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libglib2.0-0 : Depends: libffi5 (>= 3.0.4) but it is not installable
                Breaks: libglib2.0-0:i386 (!= 2.33.12+really2.32.4-5) but 2.30.0-0ubuntu4 is installed
 libglib2.0-0:i386 : Breaks: libglib2.0-0 (!= 2.30.0-0ubuntu4) but 2.33.12+really2.32.4-5 is installed
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.30.0-0ubuntu4) but 2.33.12+really2.32.4-5 is installed
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.30.0-0ubuntu4) but 2.33.12+really2.32.4-5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

--

sudo apt-get install libglib2.0-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libglib2.0-0 is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libglib2.0-0 : Depends: libffi5 (>= 3.0.4) but it is not installable
                Breaks: libglib2.0-0:i386 (!= 2.33.12+really2.32.4-5) but 2.30.0-0ubuntu4 is to be installed
 libglib2.0-0:i386 : Breaks: libglib2.0-0 (!= 2.30.0-0ubuntu4) but 2.33.12+really2.32.4-5 is to be installed
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.30.0-0ubuntu4) but 2.33.12+really2.32.4-5 is to be installed
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.30.0-0ubuntu4) but 2.33.12+really2.32.4-5 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

What do I do? Pretty much everything depends on glib.

Edit: I tried what the first commenter said and got this result:

sudo apt-get install -f libglib2.0-0=2.30.0-0ubuntu4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libpanel-applet-4-0
Use 'apt-get autoremove' to remove them.
The following packages will be DOWNGRADED:
  libglib2.0-0
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1,169 kB of archives.
After this operation, 265 kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: warning: downgrading libglib2.0-0 from 2.33.12+really2.32.4-5 to 2.30.0-0ubuntu4.
(Reading database ... 503237 files and directories currently installed.)
Preparing to replace libglib2.0-0 2.33.12+really2.32.4-5 (using .../libglib2.0-0_2.30.0-0ubuntu4_amd64.deb) ...
Unpacking replacement libglib2.0-0 ...
dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.30.0-0ubuntu4_amd64.deb (--unpack):
 './usr/share/doc/libglib2.0-0/README.gz' is different from the same file on the system
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libglib2.0-0_2.30.0-0ubuntu4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
Try: sudo apt-get install -f libglib2.0-0=2.30.0-0ubuntu4 (hinting apt-get on the regular Ubuntu version) –  gertvdijk Jan 12 '13 at 0:30
    
See the edit for my result. –  Makaze Jan 12 '13 at 0:39
    
Interesting result. I feel you're almost there, though! It's just that it complains about this error that is trivial in changes to packages: change files. Some other fresh set of eyes might spot the cause here. –  gertvdijk Jan 12 '13 at 0:48
    
I figured it out, see my answer. –  Makaze Jan 12 '13 at 0:57

1 Answer 1

As gertvdijk pointed out in his comment:

Try: sudo apt-get install -f libglib2.0-0=2.30.0-0ubuntu4 (hinting apt-get on the regular Ubuntu version)

This seemed to downgrade the package as expected, but then errored out:

Unpacking replacement libglib2.0-0 ...
dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.30.0-0ubuntu4_amd64.deb (--unpack):
 './usr/share/doc/libglib2.0-0/README.gz' is different from the same file on the system
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libglib2.0-0_2.30.0-0ubuntu4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The solution to this is deleting the offending file and repeating this for a few others in subsequent attempts. In the end, the package was successfully downgraded to the Ubuntu version!

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.