I just followed the same link you posted and got the same error trying to reinstall MATLAB. After googling for no answers for some time I realized that I forgot to change the 'username' tag in the following line of the instructions with my actual username =). Change that and it should be fixed. Hope this helps to other sleepy folks out there as well.
cd ~ sudo chown username -R ~/.matlab
