Why would I want to do this?
I’m a software developer. I love javascript. I love node.js. I love the direction Google is taking web development, user interaction, and the web in general. Installing node.js opens up a lot of possibilities for me on my CR-48. I don’t know if this will work on anything other than the CR-48, considering the machine has to be in developer mode for these instructions.
If you don’t have a chromebook yet, or you don’t know what they are… where have you been? But seriously, visit http://www.google.com/chromebook/ and check them out.
Before I start, let me first say that following these instructions may void your warranty if you have one, open your machine up to vulnerabilities, or replace existing files and cause instability. If you don’t know how to revert or fix any issues that may occur, don’t continue. I offer no sort of warranty, support, or anything else. Consider this a ‘hack’ of sorts.
I found a blog post detailing how to install an archive package and ruby on rails in ChromeOS. I followed part of these instructions and I have modified them to fit my needs.
Prerequisites
- You must have a Chromebook, possibly only the CR-48
- You must be in ‘developer mode‘
- You must have a writable rootfs (see above link for developer mode)
Instructions
Downloading and installing xz
- Download the xz package
- Enter crosh or VT-2 (CTRL+ALT+T or CTRL+ALT+→)
- If VT-2, login to the shell
- Run on the terminal: cd /home/chronos/user/Downloads
- Run on the terminal: tar -zxf xz-*.tar.gz
- Run on the terminal: cd usr
- Run on the terminal: cp * /usr/
Now that xz is installed in /usr/bin (verify by running on the command line: which xz), you will be able to extract certain files that are necessary for nodejs and possibly any other package you’d like.
Download and install nodejs and openssl.
The site claims openssl is optional, but node wouldn’t open without it
- Download nodejs
- Download openssl
- Enter the terminal again and navigate to /home/chronos/user/Downloads
- Run on the terminal: xz -d node*.xz
- Run on the terminal: tar -zxfv openssl*.tar.gz
- Run on the terminal: cd usr
- Run on the terminal: cp * /usr/
Now you should have a working install of nodejs. You can use npm, for instance, to install express and jade.