I was facing the same problem, found a solution from here:
https://bitcointalk.org/index.php?topic=110627.msg1204122#msg1204122You'll need a bit of swap

sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
After compiling, remove swap:
sudo swapoff /swapfile
sudo rm /swapfile
For myself, this did the trick just fine
Hadn't occurred to me - Thanks - worked perfect.