Home > Net >  relocation error: symbol pthread_getattr_np, version GLIBC_2.2.5 not defined in file libpthread.so.0
relocation error: symbol pthread_getattr_np, version GLIBC_2.2.5 not defined in file libpthread.so.0

Time:08-06

I would like to use dust for my remote server (without root permission). I unzipped the executable from dust release. But when I ran it throwed

dust: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by dust)

After some googling, I figured this was caused by system-installed glibc version being too low. So I installed gcc 11.3.0 and glibc 2.35 from the source. Since I do not have root permission, from this question I learned to use patchelf to inject the glibc path:

patchelf --set-rpath /path/to/glibc/lib dust

I thought it would solve every issue but no, there was again one more issue:

dust: relocation error: dust: symbol pthread_getattr_np, version GLIBC_2.2.5 not defined in file libpthread.so.0 with link time reference

But I do have a libpthread.so.0 in /path/to/glibc/lib.

I couldn't find any useful information online, except this page. Yet I couldn't find this page very useful.

I'm using Cent OS 7.

If anyone has any clue, I would highly appreciate it. Thank you.

CodePudding user response:

from this question I learned to use patchelf to inject the glibc path

You have done ½ of the job you need to do.

In addition to setting RPATH, you also need to set the interpreter (as the referenced answer explains). patchelf --set-interpreter /path/to/glibc/lib/ld-linux.so.2 dust should do.

  • Related