donavyn
Posts: 30
Joined: Sun Jun 03, 2018 10:40 pm

undefined symbol: g_date_copy

Thu Oct 17, 2019 4:54 pm

Code: Select all

[email protected]:/# sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://mirrordirector.raspbian.org/raspbian buster InRelease
/usr/bin/gdbus: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined symbol: g_date_copy
Reading package lists... Done
Since yesterday I've received this after issuing an update to Rasp Buster.

What is this, and how do I fix it?

Kendek
Posts: 177
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 5:23 pm

Are you checked this? The libglib moved to /usr/lib since version 2.56.0-5.

donavyn
Posts: 30
Joined: Sun Jun 03, 2018 10:40 pm

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 5:52 pm

Yes, I performed research before posting, that particular command was issued without error, however, I still receive the message when I attempt to pull updates.

Code: Select all

[email protected]:/# rm -f /lib/x86_64-linux-gnu/libglib-2.0.so.0 /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.1
[email protected]:/# sudo apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]                                                   
Get:2 http://mirrordirector.raspbian.org/raspbian buster InRelease [15.0 kB]                                                           
Hit:3 http://archive.raspberrypi.org/debian buster InRelease                                          
Fetched 29.9 kB in 2s (15.2 kB/s)         
/usr/bin/gdbus: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined symbol: g_date_copy
Reading package lists... Done

donavyn
Posts: 30
Joined: Sun Jun 03, 2018 10:40 pm

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 5:59 pm

Interestingly enough, and this may be related, this is the output if I issue an 'upgrade' command:

Code: Select all

[email protected]:/# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3 (3.7.3-1) ...
running python rtupdate hooks for python3.7...
dpkg-query: package 'dh-python' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of dh-python
error running python rtupdate hook dh-python
dpkg: error processing package python3 (--configure):
 installed python3 package post-installation script subprocess returned error exit status 4
dpkg: dependency problems prevent configuration of unattended-upgrades:
 unattended-upgrades depends on python3; however:
  Package python3 is not configured yet.

dpkg: error processing package unattended-upgrades (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-gi:
 python3-gi depends on python3 (<< 3.8); however:
  Package python3 is not configured yet.
 python3-gi depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-gi depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package python3-gi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lsb-release:
 lsb-release depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package lsb-release (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-distro-info:
 python3-distro-info depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package python3-distro-info (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-dbus:
 python3-dbus depends on python3 (<< 3.8); however:
  Package python3 is not configured yet.
 python3-dbus depends on python3 (>= 3.7~); however:
  Package python3 is not configured yet.
 python3-dbus depends on python3:any; however:
  Package python3 is not configured yet.

dpkg: error processing package python3-dbus (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-apt:
 python3-apt depends on python3 (<< 3.8); however:
  Package python3 is not configured yet.
 python3-apt depends on python3 (>= 3.7~); however:
  Package python3 is not configured yet.
 python3-apt depends on python3:any (>= 3.3~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-apt (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 unattended-upgrades
 python3-gi
 lsb-release
 python3-distro-info
 python3-dbus
 python3-apt
/usr/bin/gdbus: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined symbol: g_date_copy
E: Sub-process /usr/bin/dpkg returned an error code (1)

User avatar
B.Goode
Posts: 9836
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 6:00 pm

It might not (shouldn't?) be relevant, but for comparison sake what happens if you do what I usually do and invoke

Code: Select all

sudo apt-get update
from a standard unprivileged user account, not as root?


But it may just be that something in the past broke your package management?

Kendek
Posts: 177
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 6:03 pm

donavyn wrote:
Thu Oct 17, 2019 5:52 pm
Yes, I performed research before posting, that particular command was issued without error, however, I still receive the message when I attempt to pull updates.
If this is the problem, you need to remove the correct files:

Code: Select all

sudo rm /lib/arm-linux-gnueabihf/libglib-2.0.so.0*

donavyn
Posts: 30
Joined: Sun Jun 03, 2018 10:40 pm

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 6:16 pm

I was able to fix it with the following:

Code: Select all

[email protected]:/# sudo apt autoremove
Which resulted in the following output:

Code: Select all

The following packages will be REMOVED:
  distro-info-data gir1.2-glib-2.0 iso-codes libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libicu63 libpython3-stdlib libxml2 lsb-release
  python-apt-common python3 python3-apt python3-dbus python3-distro-info python3-gi python3-minimal shared-mime-info ucf xdg-user-dirs
0 upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 74.2 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 15458 files and directories currently installed.)
Removing lsb-release (10.2019051400+rpi1) ...
Removing python3-gi (3.30.4-1) ...
dpkg: warning: while removing python3-gi, directory '/usr/lib/python3/dist-packages/pygtkcompat' not empty so not removed
dpkg: warning: while removing python3-gi, directory '/usr/lib/python3/dist-packages/gi/repository' not empty so not removed
dpkg: warning: while removing python3-gi, directory '/usr/lib/python3/dist-packages/gi/overrides' not empty so not removed
Removing python3-distro-info (0.21) ...
Removing python3-dbus (1.2.8-3) ...
dpkg: warning: while removing python3-dbus, directory '/usr/share/doc/python3-dbus' not empty so not removed
dpkg: warning: while removing python3-dbus, directory '/usr/lib/python3/dist-packages/dbus/mainloop' not empty so not removed
Removing python3-apt (1.8.4) ...
dpkg: warning: while removing python3-apt, directory '/usr/lib/python3/dist-packages/aptsources' not empty so not removed
dpkg: warning: while removing python3-apt, directory '/usr/lib/python3/dist-packages/apt/progress' not empty so not removed
Removing python3 (3.7.3-1) ...
Removing distro-info-data (0.41) ...
Removing gir1.2-glib-2.0:armhf (1.58.3-2) ...
dpkg: warning: while removing gir1.2-glib-2.0:armhf, directory '/usr/lib/arm-linux-gnueabihf/girepository-1.0' not empty so not removed
Removing iso-codes (4.2-1) ...
dpkg: warning: while removing iso-codes, directory '/usr/share/xml' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/uz/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/tk/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/sw/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/sd/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/sc/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/mt/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/mi/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/mhr/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/lo/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/io/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/ht/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/ha/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/gv/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/gn/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/fy/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/frp/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/en/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/dv/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/ckb/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing iso-codes, directory '/usr/share/locale/ach/LC_MESSAGES' not empty so not removed
Removing libgirepository-1.0-1:armhf (1.58.3-2) ...
Removing shared-mime-info (1.10-1) ...
Removing libglib2.0-0:armhf (2.58.3-2+deb10u1) ...
Removing libglib2.0-data (2.58.3-2+deb10u1) ...
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/yi/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/tt/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/[email protected]/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/rw/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/hy/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/[email protected]/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/[email protected]/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/locale/az/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing libglib2.0-data, directory '/usr/share/doc/libglib2.0-data' not empty so not removed
Removing libxml2:armhf (2.9.4+dfsg1-7+b3) ...
dpkg: warning: while removing libxml2:armhf, directory '/usr/share/doc/libxml2' not empty so not removed
Removing libicu63:armhf (63.1-6) ...
Removing libpython3-stdlib:armhf (3.7.3-1) ...
Removing python-apt-common (1.8.4) ...
dpkg: warning: while removing python-apt-common, directory '/usr/share/locale/oc/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing python-apt-common, directory '/usr/share/locale/en_CA/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing python-apt-common, directory '/usr/share/locale/en_AU/LC_MESSAGES' not empty so not removed
dpkg: warning: while removing python-apt-common, directory '/usr/share/locale/csb/LC_MESSAGES' not empty so not removed
Removing python3-minimal (3.7.3-1) ...
Removing ucf (3.0038+nmu1) ...
Removing xdg-user-dirs (0.17-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
I then issued another request for updates and upgrades:

Code: Select all

[email protected]:/# sudo apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://mirrordirector.raspbian.org/raspbian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done                 
[email protected]:/# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

donavyn
Posts: 30
Joined: Sun Jun 03, 2018 10:40 pm

Re: undefined symbol: g_date_copy

Thu Oct 17, 2019 6:17 pm

Since I have a clean output after issuing update and upgrade, does anyone have any further suggestion to ensure that the OS is stable again?

Return to “Troubleshooting”