juergen d
juergen d

Reputation: 204794

strlen runtime error on Ubuntu

I develop a CGI C++ application that I compiled under Debian. Running this app on an Ubuntu system I am getting the error:

relocation error: /lib32/libresolv.so.2: symbol strlen, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

What can I do now? Should I recomile on the Ubunto system? Can I replace a library?

Edit

I link my application with -static.
Running the command ldd --version on the Ubuntu system showed my that EGLIB is used there.

Upvotes: 2

Views: 995

Answers (1)

user405725
user405725

Reputation:

What this error means is that your program was compiled/linked against an older version of GNU libc, which is not supported on the system where you want to run your executable.

You have few options to solve it:

  1. Make sure you use the same or compatible version of libc when compiling and running.
  2. Link against a static runtime.
  3. Install older version of libc on Ubuntu system to match the Debian's environment.

Upvotes: 3

Related Questions