임베디드 | 라즈베리파이 | ARM | 리눅스 | Qt | 딥러닝

git clone 시 에러 fatal: Out of memory, malloc failed 출력시 해결방법





해결 전 발생 에러 메시지

out of memory





간단하다. 아래 순서대로 진행하면 잘 동작된다


sudo fallocate -l 4G /swapfile

sudo chmod 600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

You can make these changes permanent by adding to /etc/fstab:


/swapfile   none    swap    sw    0   0

They recommend adding to /etc/sysctl.conf:


vm.swappiness=10

vm.vfs_cache_pressure = 50


이상없이 잘 동작함