Installing node-webkit on Ubuntu Linux is easy. We are going to install node-webkit into our home directory so that we do not need to use sudo during development.
If you use Ubuntu 13.04 or 13.10 there is a fix for the libudev error at the end of this post.
Create a directory structure to store locally installed packages.
mkdir -p ~/opt/packages && cd $_
Change the version numbers below as new versions of node-webkit are released.
Download the node.js package.
Unzip the package.
gzip -dc node-webkit-v0.9.1-linux-x64.tar.gz | tar xf -
Create a symlink to the currently installed version. We can change the symlink in the future to easily upgrade our node-webkit version.
ln -s ~/opt/packages/node-webkit-v0.9.1-linux-x64/ ~/opt/node-webkit
Add node-webkit to your PATH.
Write the following in your
# Add node-webkit to PATH if [ -d "$HOME/opt/node-webkit" ]; then PATH="$PATH:$HOME/opt/node-webkit" fi
Ensure that the
nw command is in your
libudev.so.0error on Ubuntu 13.04 / 13.10
If you are using Ubuntu 13.04 or 13.10, then you will get the following error
when you first run
error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
The problem is that newer versions of Ubuntu use libudev.so.1 while node-webkit is built against libudev.so.0. However, fixing the error is easy.
sudo apt-get install ghex cd ~/opt/node-webkit ghex nw
ghex GUI will open with
nw and you should see an empty node-webkit window.
We specialize in helping professional developers, like you, expand your skill set. Our courses are focused on enabling you to learn everything necessary to use a new technology in a live, production application.
All courses are made with love in
Palo Alto, CA.
Subscribe to our newsletter