17

firstly, I google'd a lot but nothing I found related to my case, I have an ELF executable file I'm trying to run it in my Ubuntu WSL, I've changed the permissions (chmod +x file), when I run it, this error shows up

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by myFile)

and when I use ld command this shows up to me

myFile(.eh_frame); no .eh_frame_hdr table will be created

and when I tried to upgrade GLIBC it says it's up-do-date

Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.7).
libc6 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 215 not upgraded.

and then I tried manually installing the deb file from https://packages.ubuntu.com/impish/amd64/libc6/download but this shows up to me :

dpkg: regarding libc6_2.34-0ubuntu3.2_amd64.deb containing libc6:amd64:
 libc6:amd64 breaks fakeroot (<< 1.25.3-1.1ubuntu2~)
  fakeroot (version 1.24-1) is present and installed.

dpkg: error processing archive libc6_2.34-0ubuntu3.2_amd64.deb (--install):
 installing libc6:amd64 would break fakeroot, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 libc6_2.34-0ubuntu3.2_amd64.deb
Int Ver
  • 185
  • 1
  • 1
  • 7
  • 3
    GLIBC (libc6) *is* your OS (together with the kernel) and cannot be changed. ....... Suggest: Install Ubuntu 22.04 : Has `libc6_2.35` .... (Which includes objects from previous versions : `GLIBC_2.34` etc.) – Knud Larsen Apr 20 '22 at 17:51
  • Try to check [this solution](https://stackoverflow.com/a/76114374/15620516), it worked for me – Gpp22 May 09 '23 at 07:35

4 Answers4

8

DISCLAIMER: I am not a linux professional, just found a way for my own problem with glibc not found error msg:

maybe you cannot use the binary since it was compiled with gcc-11 and your gcc version of your linux distribution and version only is gcc-9 and therefore only provides glibc_2.31 (I guess). you can try to compile the program yourself from source. I had to do this with the new stockfish version 15, which also uses updated glibc_2.32/2.33/2.34 and my linux-mint does not provide that. But compiling from source worked like a charm. Maybe this is an option for you.

Caro Kann
  • 89
  • 1
8

I've got this error with buildroot-2022.11 when executing make.

Ubuntu 20.04 - added this repo as described in the link

sudo apt update
sudo apt install libc6

It automatically installed 2.35 for me.

2

I have some similar situation,

I copyed my executed file from a centos VM1 to another centos VM2,then I got the same question,I just copy the source code to VM2,and recompile it,then the question is solved.

I got a makefile and a shell script to compile it,so the compilation process is simple,update glibc may cause other problem and is more complicated,and i am a caiji,hope to help u

sleepy2con
  • 51
  • 6
0

I had the same problem, it was an issue about the overwrite of the Environment Variable LD_LIBRARY_PATH. Try to check this solution

Gpp22
  • 43
  • 1
  • 9
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34356785) – Moritz Ringler May 14 '23 at 18:43