The following error occurs when installing lxml:
GCC: Internal compiler error: killed (Program PC3)
View dmesg to find the following error message:
[2517343.500178] out of memory: Kill process 5051 (PC3) score 632 or sacririice child
[2517343.501833] killed process 5051 (PC3) Total-VM: 471664kb, anon-RSS: 326648kb, file-RSS: 0kb
[2517441.995124] systemd-journald [233]: vacuuming done, freed 4194304 byte
It seems that the main problem is caused by insufficient memory. To solve this problem, add a swap partition. The specific method is as follows:
Sudo mkdir-P/var/Cache/SWAP/sudo dd If =/dev/Zero of =/var/Cache/SWAP/swap0 BS = 1 m COUNT = 512 sudo chmod 0600/ var/Cache/SWAP/swap0sudo mkswap/var/Cache/SWAP/swap0 sudo Swapon/var/Cache/SWAP/swap0
References:
Http://stackoverflow.com/questions/19761226/how-to-compile-ruby-with-rvm-on-a-low-memory-system
Https://github.com/pydata/pandas/issues/1880#issuecomment-9920484
Solution for GCC: Internal compiler error: killed (Program) When lxml is installed