I built an application on my computer and tried to run it on another computer and got this error:
$ ./foobar
./foobar: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by ./libfoobar.so.6)
./foobar: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by ./libfoobar.so.6)
./foobar: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./libfoobar.so.6)
./foobar: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by ./libfoobar.so.6)
The error messages complain that the GLIBC
and CXXABI
versions from the binary I was running was not found on the destination computer. This error is typically caused when the glibc, compiler and linker versions differ widely between the source and destination system. Especially if the source system is newer than the destination system.
In my case, I found that my source computer was running Ubuntu 18.04 and the destination was using Ubuntu 16.04. Since installing an older compiler and library toolchain is not ideal, I instead compiled the application inside a Ubuntu 16.04 container and used those binaries on the destination computer. That worked without any further errors.