开发者

GCC Compile error when copying 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 fine on that host but when i copy /c (which contains bin, libexec etc) to a ubuntu 10.04.2 host 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've also installed and compiled gmp, mpfr and mpc from source (same versions as i did on the 开发者_开发百科10.10 host) but it's still coming up with the same error.

The reason i'm not recompiling gcc on each host is because it takes too long, and prefer not to use the gcc (from the build-essential) deb that comes with ubuntu

Please help


did you export your LD_LIBRARY_PATH environment variable? Looking at the error, it's not able to find libmpc.so.2.

Try 'locate libmpc.so.2' and if you can find that, export LD_LIBRARY_PATH=


Here are some details on how to set LD_LIBRARY_PATH in Ubuntu: https://help.ubuntu.com/community/EnvironmentVariables#File-location%20related%20variables

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜