The simplest solution-error when building and installing Clang and llvm: ld terminated with signal 9

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;

Guess you like

Origin blog.csdn.net/weixin_41754258/article/details/112726356