GLIBC_2.33 not found in raspberry pi python
Asked Answered
S

4

6

Error Trace:

ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/pi/.local/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so)

Scenario:

I'm using google cloud vision api to detect text in images. The program works fine on laptop but gives the above mentioned error when ran in raspberry pi. I've searched a lot but couldn't find any working solution. I'd really appreciate if any one could let me know how to solve this.

Stephan answered 9/2, 2022 at 18:2 Comment(0)
C
5

Uninstalling grpcio and grpcio-status (mine had version 1.46.3 installed for both) and installing version 1.44.0 solved it for me:

pip uninstall grpcio 
pip uninstall grpcio-status 
pip install grpcio==1.44.0 --no-binary=grpcio
pip install grpcio-tools==1.44.0 --no-binary=grpcio-tools

You can check your installed versions with pip list.

Note: installing grpcio and grpcio-status takes a really long time. About 15 to 20 minutes each.

Originally posted here: https://groups.google.com/g/grpc-io/c/vjbL3IdZ2Vk/m/EcKSeD4eAgAJ

Cabinetwork answered 3/6, 2022 at 5:16 Comment(3)
Thanks a lot! Just a small hint: pip install grpcio==1.44.0 alone failed for me with the same error as in the original question. The key here was the --no-binary argument. It makes python skip the installers and instead compile everything on your system, honoring your available glibc version. It would problably have worked for newer grpcio versions too...Joshuajoshuah
@Joshuajoshuah thank you, I'd try a newer version if the install didn't take so longCabinetwork
Newer versions fail for me with TypeError: expected str, bytes or os.PathLike object, not list. Happily pip seems to keep trying lower versions until it reaches 1.44.0, which works.Murderous
H
3

GLIBC and the kernel of the OS go hand-in-hand; you basically need a newer version of your OS, if you need a more recent GLIBC

the version of the GLIBC can be quickly found out with the following command: ldd --version

Hydrology answered 9/2, 2022 at 19:56 Comment(2)
My raspberry pi has OS 10 Buster. Should i upgrade it to OS 11 ?Stephan
I'm running with OS 11 Bullseye but, as other answers say, the libc version is baked into the kernel. It's possible a fresh download of the OS image may include a newer version, but I can't find any resource that confirms this.Murderous
A
1

Have you tried building glibc 2.33+ alongside the glibc that come in raspberry pi? Something along this answer and comments to use buildroot

Alkaline answered 9/2, 2022 at 19:17 Comment(1)
The linked answer sounds like going down a deep rabbit hole...Saito
L
0

I got this error after installing tflite-runtime 2.12.0, and I found that installing tflite-runtime 2.11.0 got rid of it. The wheel files for your processor/python combo can be found here: https://pypi.org/project/tflite-runtime/2.11.0/#files

Lanta answered 7/6, 2023 at 2:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.