llouk
Posts: 6
Joined: Thu Mar 05, 2020 9:18 pm

Error with apt-get and anything that runs python3

Tue Apr 07, 2020 2:58 pm

Hello to all,

I have an issue with apt-get and any script I will call python3.
When I run apt-get upgrade this happends every time:

Code: Select all

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libgnutls30
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,047 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
/usr/bin/python3: relocation error: /usr/bin/python3: symbol `Up version GLIBC_2.4 not defined in file libc.so.6 with link time reference
E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1)
E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10
I was looking around it and I found out that when I run python3 it outpus this:

Code: Select all

python3: relocation error: python3: symbol `Up version GLIBC_2.4 not defined in file libc.so.6 with link time reference
I compared some stuff between my two raspberry pi's.
The variable $GLIBC_2.4 contains the value ".4" in both systems,
The python executables in /usr/bin/ are exactly the same in both systems.
And also the files and their symbolic links are exactly the same in the directory /lib/arm-linux-gnueabihf/

Is there anything else I can check so I can figure out what is happenning?

Thank you in advance!

llouk
Posts: 6
Joined: Thu Mar 05, 2020 9:18 pm

Re: Error with apt-get and anything that runs python3

Tue Apr 07, 2020 6:55 pm

Thanks for the reply, but did you even read what my problem is?
You should fully update Raspbian Buster:

https://www.raspberrypi.org/documentati ... pdating.md
My system is Buster, and I CANNOT run "apt upgrade" or "apt dist-upgrade" or "apt full-upgrade" Those fail because of python3
Then prior to install software from repositories you should run apt update first:

https://www.raspberrypi.org/documentati ... are/apt.md
apt-get update completes successfully

You're just telling me to do, something that as I described above just fails...
If you are going to reply again, please read my issue and don't post irrelevant stuff!

llouk
Posts: 6
Joined: Thu Mar 05, 2020 9:18 pm

Re: Error with apt-get and anything that runs python3

Tue Apr 07, 2020 8:38 pm

Some additional information I just figured out from the logs.
The last package I installed was "tmux".

Start-Date: 2020-04-06 08:13:51
Commandline: apt-get install tmux
Requested-By: llouk (1000)
Install: libutempter0:armhf (1.1.6-3, automatic), tmux:armhf (2.8-3)
End-Date: 2020-04-06 08:14:03

Tmux or it's dependency triggered a change in libc-bin

Log started: 2020-04-06 08:13:51
Selecting previously unselected package libutempter0:armhf.
(Reading database ... 160347 files and directories currently installed.)
Preparing to unpack .../libutempter0_1.1.6-3_armhf.deb ...
Unpacking libutempter0:armhf (1.1.6-3) ...
Selecting previously unselected package tmux.
Preparing to unpack .../archives/tmux_2.8-3_armhf.deb ...
Unpacking tmux (2.8-3) ...
Setting up libutempter0:armhf (1.1.6-3) ...
Setting up tmux (2.8-3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Log ended: 2020-04-06 08:14:03

User avatar
jojopi
Posts: 3192
Joined: Tue Oct 11, 2011 8:38 pm

Re: Error with apt-get and anything that runs python3

Tue Apr 07, 2020 8:40 pm

llouk wrote:
Tue Apr 07, 2020 2:58 pm
The variable $GLIBC_2.4 contains the value ".4" in both systems,
$GLIBC_2.4 is the variable ${GLIBC_2} followed by the text ".4". No worries, because the library/symbol version has nothing to do with any environment variables.
The python executables in /usr/bin/ are exactly the same in both systems.
How did you verify that?

I think the /usr/bin/python3 executable on the broken system is corrupt. Specifically I suspect that the symbol "dup" has two bit errors, one changing the "d" to a backtick, and one changing the case of the "u". When I make these changes, I get your exact error.

Copying a good version of /usr/bin/python3 should fix apt. Then I would suggest you install and run debsums to check if any other files have errors:

Code: Select all

sudo apt install debsums
sudo debsums -c
On a good system, the second command should take a few minutes and produce no output.

Bit errors could be caused by overclocking, or by faulty hardware; most likely the SD card.

llouk
Posts: 6
Joined: Thu Mar 05, 2020 9:18 pm

Re: Error with apt-get and anything that runs python3

Wed Apr 08, 2020 9:54 am

jojopi thank you very much for the response.
I "veryfied" those just by comparing filesizes and bytes of those files. The siliest way possible :P

The problem is now resolved, I copied the python3 from my other system

I run "sudo debsums -c" on my systems and the result is:

Working Raspeberry:

Code: Select all

debsums: missing file /usr/share/X11/xorg.conf.d/99-fbturbo.conf (from xserver-xorg-video-fbturbo package)
Raspeberry for fixing:

Code: Select all

/usr/share/locale/vi/LC_MESSAGES/glib-networking.mo
/usr/share/locale/vi/LC_MESSAGES/glib20.mo
/usr/share/locale/ar/LC_MESSAGES/gtk20-properties.mo
/usr/lib/arm-linux-gnueabihf/libodfgen-0.1.so.1.0.7
/usr/share/icons/hicolor/48x48/mimetypes/libreoffice-spreadsheet.png
/usr/share/scratch/Projects/Sensors and Motors/gpio-PiFace.sb
/lib/modules/4.19.97-v7l+/kernel/drivers/hid/hid-wiimote.ko
/usr/share/scratch/Media/Costumes/Things/hair1.gif
/usr/share/vim/vim81/doc/netbeans.txt
/usr/share/vim/vim81/doc/pi_getscript.txt
/usr/share/vim/vim81/doc/quotes.txt
/usr/share/fonts/X11/75dpi/luIS10.pcf.gz
Are you suggesting that I should replace those files from the other system?
Or is it a way to automatically fix those?

Thank you!

User avatar
jojopi
Posts: 3192
Joined: Tue Oct 11, 2011 8:38 pm

Re: Error with apt-get and anything that runs python3

Wed Apr 08, 2020 12:34 pm

You can check what package a file belongs to with "dpkg -S FILE", and then reinstall that package with "sudo apt install --reininstall PACKAGE".

In the case of the vim .txt files, I would be tempted to take copies of the faulty versions first, and then compare them against the corrected files using "diff". This could help to confirm that you are having random bit errors, as opposed to loss of data due to unexpected power losses.

llouk
Posts: 6
Joined: Thu Mar 05, 2020 9:18 pm

Re: Error with apt-get and anything that runs python3

Wed Apr 08, 2020 1:43 pm

Ok, I will do that, thank you very much!
Do you know what could have caused this? And what to do in order not to happen again?

Return to “Troubleshooting”