Fix for the node-webkit 'libudev not found' error

If like me you try to install node-webkit on Ubuntu (I'm on 14.10 right now), you will run into a weird error.

Upon running the nw executable you will see an error that says:

Error: node webkit error while loading shared libraries:
        libudev.so.0: cannot open shared object file: No such file or directory

The obvious step is to check if you have libudev, but sudo apt-get install tells you that the latest version is already installed on your machine.

The actual problem here is that node-webkit has a dependency for an older version of libudev hardcoded.

The fix is easy, it is to update the nw binary and have it depend on the available version of libudev.

Running this command will suffice:

sed -i 's/udev\.so\.0/udev.so.1/g' nw

Now back to code ;-)