GCC compilation error when copying the compiled version to another host

I compiled gcc on one of my ubuntu 10.10 hosts and installed it in / c. I can compile c and C ++ programs on this host, but when I copy / c (which contains bin, libexec, etc.) to the ubuntu 10.04.2 node, I get:

/c/libexec/gcc/i686-pc-linux-gnu/4.5.2/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory

when compiling a simple .c file.

I also installed and compiled gmp, mpfr and mpc from the source code (the same versions as I did on host 10.10), but it still appears with the same error.

The reason I don't recompile gcc on every host is because it takes too much time and prefers not to use the gcc (from string) deb that comes with ubuntu

Please, help

+3
source share
2

LD_LIBRARY_PATH? , libmpc.so.2.

libmpc.so.2 ', , export LD_LIBRARY_PATH =

+8

All Articles