在最新的gcc 4.9.1软件包中,在./configure之后我运行make,它失败并显示错误消息:
checking for x86_64-unknown-linux-gnu-gcc... /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/root/tar/gcc-4.9.1/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
我检查了x86_64-unknown-linux-gnu / libgcc /中的config.log,它说,
configure:3389: /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5
/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -c -g -O2 conftest.c >&5
/root/tar/gcc-4.9.1/host-x86_64-unknown-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
configure:3606: $? = 1
configure: failed program was:
但显然我在/ usr / local / lib中有libmpc.so.2。怎么了?
答案 0 :(得分:1)
看起来问题是由于缺省路径/ usr / local / lib未包含在$ LD_LIBRARY_PATH环境变量中。对不起这个愚蠢的问题......