Getting rid of the error version GLIBC_2.40 not found
When i compile an app written in C and copy it to another system, it is usual that i have an error like this one :
“Error /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.40’ not found”.
On my main system (Archlinux) i have the gnu libc version 2.40 and on my second system i have 2.36 (Debian).
To get rid of that error there are two options that i use:
- Static binding, the output file will not require any library but it will be bigger
gcc <myfile.c> -o <myfile> -static
- Using the shared option
gcc <myfile.c> -o <myfile> -shared