I had problem with GLIBC version while executing an exe
file compiled in c
.
/lib/x86_64-linux-gnu/libm.so.6: version 'GLIBC_2.29' not found
I found that I was using GLIBC_2.27
. I updated to GLIBC_2.29
as mentioned the post
Once I installed GLIBC_2.29
, I set the library path using patchelf
command like below,
patchelf --set-interpreter /path/to/newglibc/ld-linux.so.2 --set-rpath /path/to/newglibc/ myapp
Now I got a new error,
error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory
On checking for the file libcap.so.2
mentioned, I could see it is in the /lib/x86_64-linux-gnu/
path.
I am not sure how to set path for the libcap as I already set path to the glib.
Did I set the path in the wrong manner?. Is there anything I missed during the path setup in the above step?
NOTE : My Operating system is Ubuntu 18.01
I am not sure how to set path for the libcap as I already set path to the glib.
You can set multiple RUNPATH
s like so:
patchelf --set-interpreter /path/to/newglibc/ld-linux.so.2 \
--set-rpath /path/to/newglibc:/lib myapp