Skip to content

Resolved: Debian Jessie bug libglib2.0-0

I am still using Debian Jessie, and I have no plans to upgrade to the newest one (Debian Stretch), I have too many codes bases on some very stable. Migration only in June 6th 2018.

Yesterday my Firefox-ESR started to present a lot of errors. I closed and started it again, but it was not possible to open the browser due to an error (Mozilla Crash Report). Unfortunately, removing ~/.mozilla folder does not solved the issue. Apt-getting to reinstall firefox has no effect whatsoever. I was thinking, what the heck is going on?

Maybe, I have some issue with libraries or permissions that have been changed after I have installed the newest R-Project 3.4.2 version. Nope, nothing has really changed. But I remembered typing ‘apt-get dist-upgrade’ in some moment two days ago (no pc restart then).

I download the newest Firefox version 56, and there was the same Mozilla Crash Report, I was like:

What the Heck

To try to figure out what was going on and solve the issue I used strace, gdb, dpkg, VirtualBox, and a clean Firefox 56 version folder.

I was 100% sure that a recent download file from Mozilla would not be that broken either, thus under this new firefox folder I executed:

$ strace ./firefox

I saw few errors but nothing too strange to me. GNU debugger time!

$ gdb
file ./firefox
run

and gotcha

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff19f24fa in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0

Okay, what is libgobject-2.0.so.0 ? Which package provides this lib? To find out, run:

$ dpkg -S libgobject-2.0.so.0
libglib2.0-0:amd64: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.1
libglib2.0-0:amd64: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
libglib2.0-0:i386: /usr/lib/i386-linux-gnu/libgobject-2.0.so.0

To find more information about it, I used:

$ dpkg -l libglib2.0-0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version      Arquitect      Desc
+++-==========================-==================-==================-==========================================================
ii libglib2.0-0:amd64 2.42.1-1+b1 amd64         GLib library of C routines
ii libglib2.0-0:i386 2.50.2-2     i386          GLib library of C routines

It seems that lib was kind of lost on which version should be, and I don’t know why. I decided to reinstall that lib to see if that would solved the issue. Note: just follow the procedures if you know how to install packages in terminal or without X (desktop ) environment.

When I tried to reinstall libglib2, dpkg said that libglib2.0-dev was depending of the former lib. I tried removed that lib without making sure which packages were depending on it! (Shame on me). I have made a simulation on VirtualBox, and that started to remove many packages :D

To check what are the package dependencies, run:

$ apt-cache showpkg libglib2.0-dev
Package: libglib2.0-dev
Versions: 
2.50.2-2 (/var/lib/dpkg/status)
 Description Language: 
 File: /var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_binary-amd64_Packages
 MD5: f1a310bc28a3b8566d2f79a4116e8a0e
 Description Language: en
 File: /var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_i18n_Translation-en
 MD5: f1a310bc28a3b8566d2f79a4116e8a0e

2.42.1-1+b1 (/var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_binary-amd64_Packages)
 Description Language: 
 File: /var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_binary-amd64_Packages
 MD5: f1a310bc28a3b8566d2f79a4116e8a0e
 Description Language: en
 File: /var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_i18n_Translation-en
 MD5: f1a310bc28a3b8566d2f79a4116e8a0e
.... 
Reverse Depends: 
 libsoup2.4-dev,libglib2.0-dev 2.35.0
 libgdk-pixbuf2.0-dev,libglib2.0-dev 2.37.6
....

To solve that and not remove everything, the best scenario was to downgrade my lib. I found a similar issue and the answer is to provide which version should be installed. I used the original one: 2.42.1-1+b1

sudo apt-get install libglib2.0-0=2.42.1-1+b1

Some packages will be downgraded or removed.

After downgrade libglib2.0-dev, I checked once again:

$ apt-cache showpkg libglib2.0-dev
Package: libglib2.0-dev
Versions: 
2.42.1-1+b1 (/var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_binary-amd64_Packages)
 Description Language: 
 File: /var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_binary-amd64_Packages
 MD5: f1a310bc28a3b8566d2f79a4116e8a0e
 Description Language: en
 File: /var/lib/apt/lists/deb.debian.org_debian_dists_jessie_main_i18n_Translation-en
 MD5: f1a310bc28a3b8566d2f79a4116e8a0e

Run again Firefox and

Firefox 56 is up and running! By the way, I found this version way faster then Firefox-ESR one.

Additional info. On GDB I found the following entry

Starting program: /home/x/Downloads/firefox/firefox ./firefox
Dwarf Error: wrong version in compilation unit header (is 0, should be 2, 3, or 4) [in module /usr/lib/debug/.build-id/08/08c1bb645f921bacd138bc23d38f59fb4a9c67.debug]

I remove that .debug dir, and did not solved either.

That was a lot of work, but definitely less than to install everything again.

I guess the issue here was combining 386 and amd64 archs on the same machine. If you have a better explanation, please let me know using comments bellow.

Hope that might help you someday.

Sources:

https://askubuntu.com/questions/58664/cant-install-package-libglib2-0-dev-because-it-depends-on-some-unknown-version

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.