But that is not possible in my case

Yes, it is.

You must either build the application to match your desired target environment, or you must make your target environment satisfy the requirements of that applicaition you built.

One way to make the application match target environment is to build it in a chroot or a docker container that matches the target.

that is why i have built stand alone application with pyinstaller.

You are not building a "stand alone" application. You are building something that depends on GLIBC-2.14, and trying to run it on a system that doesn't have that (or newer) version of GLIBC.

I need to run this application in 'n' no.of servers, so upgrading glibc is not possible

Sure it is. You are running your application on ancient GLIBC version (version 2.14 was released in 2011). Since then, many CVEs have been discovered and fixed. By continuing to use ancient version, you are exposing your company to significant risks.

Answer from Employed Russian on Stack Overflow
Top answer
1 of 6
22

So why am I getting GLIBC_2.14 error?

Because your program depends on a symbol with that version, and you are running it on a system which doesn't provide it.

Shouldn't it be 2.19 error?

No.

When a new symbol is introduced, it gets a version assigned to it. Usually that version is the not yet released glibc version, i.e. if the current released version is 2.13, the new symbol gets version 2.14 assigned to it.

That version stays with this symbol (unless a new and incompatible version of the same symbol is introduced later).

The x86_64 GLIBC-2.19 has the following versioned symbols:

$ objdump -T /lib/x86_64-linux-gnu/libc.so.6 | grep ' g ' | head
0000000000078110 g    DF .text  0000000000000124  GLIBC_2.2.5 putwchar
0000000000096a70 g    DF .text  0000000000000020  GLIBC_2.2.5 __strspn_c1
000000000010a2b0 g    DF .text  0000000000000010  GLIBC_2.4   __gethostname_chk
0000000000096a90 g    DF .text  000000000000001a  GLIBC_2.2.5 __strspn_c2
0000000000110570 g    DF .text  00000000000000a5  GLIBC_2.2.5 setrpcent
00000000000a7ba0 g    DF .text  000000000000000a  GLIBC_2.2.5 __wcstod_l
0000000000096ab0 g    DF .text  0000000000000022  GLIBC_2.2.5 __strspn_c3
00000000000fa950 g    DF .text  0000000000000021  GLIBC_2.3.2 epoll_create
000000000010a2c0 g    DF .text  0000000000000010  GLIBC_2.4   __getdomainname_chk
00000000000fab60 g    DF .text  0000000000000021  GLIBC_2.2.5 klogctl
....

That is, if I link a program that calls putwchar, I will need at minimum version 2.2.5, but if my program also calls epoll_create, then I will need a minimum version of 2.3.2.

Your program calls some symbol with version GLIBC_2.14, most likely this one:

0000000000091620 g   iD  .text  000000000000003d  GLIBC_2.14  memcpy

Your program is known to not call any of the symbols below (or you would have gotten a different required version):

$ objdump -T /lib/x86_64-linux-gnu/libc.so.6 | egrep 'GLIBC_2.1[5-9]'
000000000010ab30 g    DF .text  0000000000000014  GLIBC_2.16  __ppoll_chk
00000000001087d0  w   DF .text  000000000000003e  GLIBC_2.17  clock_getcpuclockid
000000000010aaf0 g    DF .text  0000000000000017  GLIBC_2.15  __fdelt_warn
000000000010aaf0 g    DF .text  0000000000000017  GLIBC_2.15  __fdelt_chk
000000000003c6b0 g    DF .text  00000000000000fc  GLIBC_2.18  __cxa_thread_atexit_impl
00000000000fb070 g    DF .text  0000000000000024  GLIBC_2.15  process_vm_writev
00000000000bd420 g    DF .text  00000000000001ba  GLIBC_2.15  scandirat
00000000000af970 g    DF .text  0000000000000019  GLIBC_2.16  c16rtomb
00000000001088f0  w   DF .text  0000000000000090  GLIBC_2.17  clock_nanosleep
00000000000af6e0 g    DF .text  0000000000000282  GLIBC_2.16  mbrtoc16
00000000000a3c70  w   DF .text  0000000000000230  GLIBC_2.16  mbrtoc32
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.15  GLIBC_2.15
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.16  GLIBC_2.16
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.17  GLIBC_2.17
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.18  GLIBC_2.18
00000000000b9f40 g    DF .text  0000000000000042  GLIBC_2.16  timespec_get
0000000000083120  w   DF .text  0000000000000009  GLIBC_2.16  aligned_alloc
0000000000108810  w   DF .text  0000000000000025  GLIBC_2.17  clock_getres
0000000000108880  w   DF .text  0000000000000064  GLIBC_2.17  clock_settime
00000000000f8240  w   DF .text  0000000000000068  GLIBC_2.16  getauxval
00000000000e44f0 g    DF .text  0000000000000015  GLIBC_2.15  posix_spawn
0000000000108840  w   DF .text  000000000000003b  GLIBC_2.17  clock_gettime
00000000000a3ea0  w   DF .text  00000000000001ea  GLIBC_2.16  c32rtomb
000000000003c0b0  w   DF .text  000000000000001b  GLIBC_2.17  secure_getenv
000000000010ab10 g    DF .text  0000000000000014  GLIBC_2.16  __poll_chk
00000000000f8240 g    DF .text  0000000000000068  GLIBC_2.16  __getauxval
00000000000fb040 g    DF .text  0000000000000024  GLIBC_2.15  process_vm_readv
00000000000bd420  w   DF .text  00000000000001ba  GLIBC_2.15  scandirat64
00000000000e4510 g    DF .text  0000000000000015  GLIBC_2.15  posix_spawnp
2 of 6
3

What

ldd --verbose simulator

gives ?

I'd say GLIBC2.14 is the minimum required.

What is the version of libc.so on your system ?

Discussions

GLIBC issue
Hi community, I'm new in pyinstaller and not from C lang. Currently, I'm facing this issue: [17309] Error loading Python lib '/tmp/_MEIO1NXeM/libpython3.8.so.1.0': dlopen: /lib/arm-... More on github.com
🌐 github.com
5
8
libc runtime dynamic linker errors (newer glibc symbols)
https://github.com/pyinstaller/pyinstaller/wiki/FAQ#misc Will this ever be fixed or the the solution to compile with older version of glibc is final? Compiled on 3.2.0-70-generic #105-Ubuntu SMP We... More on github.com
🌐 github.com
3
September 1, 2015
python 2.7 - Pyinstaller GLIBC_2.15 not found - Stack Overflow
Generated an executable on Linux 32-bit Ubuntu 11 and tested it on a 32-bit Ubuntu 10 and it failed with a "GLIBC_2.15" not found. More on stackoverflow.com
🌐 stackoverflow.com
libxml2 GLIBC version issue
Froze script on CentOS6.6 using a pretty old glibc (2.12) to ensure compatibility with all linux systems. Ran it on a Ubuntu system and got the following error message: ImportError: /lib64/libc.so.... More on github.com
🌐 github.com
1
May 17, 2017
🌐
GitHub
github.com › pyinstaller › pyinstaller › issues › 2160
linux64 bootloader requires glibc 2.14 · Issue #2160 · pyinstaller/pyinstaller
August 27, 2016 - I tried to release borgbackup 1.1.0b1 (usual release process, building binaries on wheezy64, with recent pyinstaller from develop branch), but I got this: (borg-env) vagrant@vagrant:/vagrant/borg$ ./borg.exe --version ../borg.exe: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ../borg.exe)
Author   pyinstaller
🌐
Google Groups
groups.google.com › g › scitools-iris › c › AkG0xVisY4w
/lib64/libc.so.6: version `GLIBC_2.14' not found
The real solution is to have the official packages built on a machine with an older version of GLIBC, RHEL6 or equivalent.
🌐
GitHub
github.com › pyinstaller › pyinstaller › issues › 1450
libc runtime dynamic linker errors (newer glibc symbols) · Issue #1450 · pyinstaller/pyinstaller
September 1, 2015 - Error loading Python lib '/tmp/_MEIhUvRwR/libpython2.7.so.1.0': /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/_MEIhUvRwR/libpython2.7.so.1.0)
Author   pyinstaller
🌐
Google Groups
groups.google.com › g › pyinstaller › c › BsciphyIaw0
Trouble running pyinstaller generated executable on different servers
Well, this message is quite clear: You need to install glibc 2.7 on this machine. Or maybe you can rebuild libcrypto to use a older version of glibc. PyInstaller exclude glibc from it's distribution as these are available on all machines.
Find elsewhere
🌐
GitHub
github.com › pyinstaller › pyinstaller › issues › 2611
libxml2 GLIBC version issue · Issue #2611 · pyinstaller/pyinstaller
May 17, 2017 - Froze script on CentOS6.6 using a pretty old glibc (2.12) to ensure compatibility with all linux systems. Ran it on a Ubuntu system and got the following error message: ImportError: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /tmp/_MEINUlbGd/libxml2.so.2)
Author   pyinstaller
🌐
Stack Overflow
stackoverflow.com › questions › 71518650 › pyinstaller-glibc-2-25-not-found-however-another-script-works
python - pyinstaller GLIBC_2.25 not found, however another script works - Stack Overflow
March 17, 2022 - Delete directories ./build and ./dist, then try creating the executable again with pyinstaller. ... The solution, for me at least, is to build your executable on an older version of your OS.
🌐
Google Groups
groups.google.com › g › pyinstaller › c › pjYrA1EHxXA
Unable to get bootloader rebuild fix to address GLIBC version problem
~ $ orb_development_proxy ping merchant merchant Error loading Python lib '/tmp/_MEIgmrbBu/libpython2.6.so.1.0': /lib/libc.so.6: version `GLIBC_2.7' not found (required by /tmp/_MEIgmrbBu/libcrypto.so.0.9.8) Doh. It appears that rebuilding the bootloaders as documented does not in any way help with this GLIBC version problem whether on the development or release build of pyinstaller.
Top answer
1 of 3
65

That means the program was compiled against glibc version 2.14, and it requires that version to run, but your system has an older version installed. You'll need to either recompile the program against the version of glibc that's on your system, or install a newer version of glibc (the "libc6" package in Debian).

Debian has glibc 2.16 in the "experimental" repository, but recompiling the program is the safer option. Glibc is the library that everything depends on, so upgrading it can have far-reaching implications. Although there's probably nothing wrong with Debian's glibc 2.16 package, the fact that it's in the experimental repository means it hasn't received as much testing.

2 of 3
28

I have posted my solution here, repost it for reference.

In my situation, the error appears when I try to run an application (compiled on Ubuntu 12.04 LTS) using GLIBC_2.14 on Debian Wheezy (which installs glibc 2.13 by default).

I use a tricky way to run it, and get correct result:

  1. Download libc6 and libc6-dev from Ubuntu 12.04 LTS

  2. Run dpkg command to install them into a directory (/home/user/fakeroot/ for example):

    $ dpkg -x libc6-dev_2.15-0ubuntu10.6_amd64.deb /home/user/fakeroot/
    $ dpkg -x libc6_2.15-0ubuntu10.6_amd64.deb /home/user/fakeroot/
    
  3. Run your command with specified LD_LIBRARY_PATH:

    $ LD_LIBRARY_PATH=/home/user/fakeroot/lib/x86_64-linux-gnu/ YOUR_COMMAND
    
  4. My application only uses memcpy() from GLIBC_2.14, and it works.

I don't know whether it will work successfully for other applications. Wish it helpful.

🌐
GitHub
github.com › cvxpy › cvxpy › issues › 584
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found · Issue #584 · cvxpy/cvxpy
Unable to import module 'handler': /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /var/task/_CVXcanon.cpython-36m-x86_64-linux-gnu.so)
Author   cvxpy
🌐
Cisco Community
community.cisco.com › t5 › tools › pyats-importerror-lib64-libc-so-6-version-glibc-2-14-not-found › td-p › 3873782
PyATS: ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found - Cisco Community
June 16, 2019 - Hi Experts, Need Help in Running PyATS/Genie in our Lab Environment. When Trying to run Genie/PyATS I get Error message PyATS: ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found Followed the Steps mentioned in the DOC in developer.cisco.com Running this in Virtual Environment....
🌐
Snorfalorpagus
snorfalorpagus.net › blog › 2016 › 07 › 17 › compiling-python-extensions-for-old-glibc-versions
Compiling Python extensions for old glibc versions
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 IFUNC For bug reporting instructions, please see: <https://bugs.launchpad.net/ubuntu/+source/eglibc/+bugs>. On the target machine (running Scientific Linux 6) the installed version is only 2.12. $ /lib64/libc.so.6 GNU C Library stable release version 2.12, by Roland McGrath et al.
🌐
GitHub
github.com › orgs › pyinstaller › discussions › 9050
How to make Pyinstaller compile for the glibc version that the system actually has · pyinstaller · Discussion #9050
Please reload this page. ... This means that you have installed PyInstaller via binary wheel (probably from https://www.piwheels.org/), which was built for newer version of Raspbian.
🌐
GitHub
github.com › conda › conda-docs › issues › 847
conda installers fail to invoke with /lib64/libc.so.6: version `GLIBC_2.14' not found · Issue #847 · conda/conda-docs
February 26, 2023 - conda.exe: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/install/conda.testing/RedHatEnterpriseWorkstation.6.10.miniconda/conda.exe) linux-vdso.so.1 => (0x00007ffeb7fd8000) libdl.so.2 => /lib64/libdl.so.2 (0x00000038e0400000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00000038e0c00000) libc.so.6 => /lib64/libc.so.6 (0x00000038e0800000) /lib64/ld-linux-x86-64.so.2 (0x0000560b95cc2000)
Author   conda