是否可以将安装在一个系统(Ubuntu 16.04 上的 aarch64 5.4)上的编译器从主目录移到另一个系统上?我想这样做是因为我需要在我没有权限的系统上运行这个编译器。
我已经用 helloworld 程序尝试过并将其进入链接阶段,但 ld 正在寻找附加了原始路径的库:
{dseltz@ubuntu1604-64:437} aarch64-linux-gnu-g++-5 -isystem/home/dseltz/GNUTest/aarch64-linux-gnu/include/c++/5 -isysroot /home/dseltz/GNUTest -I/home/dseltz/GNUTest/usr/include/c++/5/aarch64-linux-gnu -B/home/dseltz/GNUTest/gcc_exec_files -B/home/dseltz/GNUTest/aarch64-linux-gnu -L/home/dseltz/GNUTest/aarch64-linux-gnu/lib -L/home/dseltz/GNUTest/x86_64-linux-gnu --sysroot=/home/dseltz/GNUTest/aarch64-linux-gnu/lib -o Helloworld Helloworld.cpp
/home/dseltz/GNUTest/gcc_exec_files/aarch64-linux-gnu/../../aarch64-linux-gnu/bin/ld: cannot find /usr/aarch64-linux-gnu/lib/libc.so.6 inside /home/dseltz/GNUTest/aarch64-linux-gnu/lib
/home/dseltz/GNUTest/gcc_exec_files/aarch64-linux-gnu/../../aarch64-linux-gnu/bin/ld: cannot find /usr/aarch64-linux-gnu/lib/libc_nonshared.a inside /home/dseltz/GNUTest/aarch64-linux-gnu/lib
/home/dseltz/GNUTest/gcc_exec_files/aarch64-linux-gnu/../../aarch64-linux-gnu/bin/ld: cannot find /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 inside /home/dseltz/GNUTest/aarch64-linux-gnu/lib
collect2: error: ld returned 1 exit status
请注意,这些库确实存在于 /home/dseltz/GNUTest/aarch64-linux-gnu/lib 中。
有任何想法吗?只是一个坏主意吗?