I don't know if this helps, but for me in Ubuntu running :
apt-get install -y build-essential
and then:
sudo npm install --no-bin-link --unsafe-perm
worked.
I had the same problem, il solved it using:rm -fr /root/tmp
and then sudo npm install --no-bin-link --unsafe-perm
Thx all