Problem Description
- When building and installing Clang and llvm, the following error occurred:
collect2: fatal error: ld terminated with signal 9 [killed]
compilation terminated.
problem causes
- The swap partition of Ubuntu is not enough, that is, the swap space is insufficient;
Solution
- Install swapspace and automatically allocate swap when needed;
sudo apt-get install swapspace
- If you need to free up space, restarting the system will automatically release the space, of course, you can also manually delete /var/lib/swapspace;