1

I'm trying to run the face recognition framework on my raspberry pie model 3B. After completing the installation I get the following error when trying to execute the example code with python3 facerec_on_raspberry_pi.py:

Traceback (most recent call last):
  File "facerec_on_raspberry_pi.py", line 9, in <module>
    import face_recognition
  File "/usr/local/lib/python3.6/site-packages/face_recognition/__init__.py", line 7, in <module>
    from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
  File "/usr/local/lib/python3.6/site-packages/face_recognition/api.py", line 4, in <module>
    import dlib
ImportError: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.27' not found (required by /usr/local/lib/python3.6/site-packages/dlib.cpython-36m-arm-linux-gnueabihf.so)

Here are some specs about my raspberry:

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Debian version 9.8
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

Output of ldd --version

ldd (Debian GLIBC 2.24-11+deb9u4) 2.24
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Output of /lib/arm-linux-gnueabihf/libc.so.6

GNU C Library (Debian GLIBC 2.24-11+deb9u4) stable release version 2.24, by Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 6.3.0 20170516.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.

Can anyone help me please?

ThatGuy
  • 75
  • 1
  • 9

1 Answers1

1

The version of CPython (specifically /usr/local/lib/python3.6/site-packages/dlib.cpython-36m-arm-linux-gnueabihf.so) that you have installed is incompatible with your system (requires GLIBC 2.27, while you only have GLIBC 2.24).

You must either upgrade installed GLIBC, or use a different build of CPython.

See also this answer.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • i just built cpython on that device https://stackoverflow.com/a/64737929/4933053 and still glibc is incompatible, how come since the ./configure should figure it out – droid192 Oct 27 '21 at 21:35