Reputation: 5263
I have a C++ package that I run it on my machine (Ubuntu 11.10 OS type:32 bit) and everything is perfect. When I try to run it on a Linux server (Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-39-generic x86_64)), I will get this error:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I do not know where is the problem. Hopefully you can help me.
Upvotes: 0
Views: 2481
Reputation: 477358
The different machines have different versions of the standard library installed. Since the required dynamic library version is hardcoded into the binary, you can either recompile your program on the target machine, or link the standard library statically with -static-libstdc++
.
(This is ignoring any 32-bit vs 64-bit issues; presumably you'll need 32-bit libraries on your 64-bit machine if you want to use 32-bit binaries.)
Upvotes: 1