The fix just worked for me. I had to preceed it with
sudo apt-get install hal
The first mkdir lines did nothing, the files already existed. The next two must have fixed it for me.