Monday, August 10, 2009

Installing chrome

[Update: there is now an easier, more hassle free, way to install Chrome, which can be found here.]

This post comes to you courtesy of the web browser Google Chrome. In fact so did the last post, but that was from my Mac laptop, whereas this is from my office desktop which runs Ubuntu. Installing this development version of Chrome has been a bit more trouble on my office machine than on my Mac, so I thought I'd document how I did it. The first thing to do is to download the .deb package from here (I've got the version for 32-bit systems) - this is a development version, so be warned that it could be buggy. This should then be relatively easy to install, i.e. I should just be able to type: dpkg -i google-chrome-unstable_current_i386.deb and away it goes, but unfortunately it defaults to trying to create, and then install stuff into, the /opt/google directory and for me, even with sudo, I can't write to that directory as it's not local to my machine - I get an error stating:
dpkg: error processing google-chrome-unstable_current_i386.deb (--install):
error creating directory `./opt/google': No such file or directory
Errors were encountered while processing:

However, much searching has led me to find a solution to this (mainly from this page) that enabled me to install chrome in the directory of my choosing. Here's how it goes:-
Say you've downloaded the above .deb file to ~/Desktop, then create a directory to unpack it into:
mkdir ~/Desktop/chrome; cd ~/Desktop/chrome
then unpack the .deb file
ar -x ~/Desktop/google-chrome-unstable_current_i386.deb
Now uncompress the lzma file
lzma -d data.tar.lzma

Next you want to figure out where to install Chrome (i.e. somewhere that your permissions allow you to write to). I, for example, created a directory called /data/matthew/chrome. cd into that directory and then run
sudo tar xf ~/Desktop/chrome/data.tar
(If you're just writing to somewhere that your normal permissions allow you to write to then you don't even have to run sudo.) This will add opt, etc and usr directories to the directory you are in, with the main stuff for Chrome being in opt/google/chrome. I can therefore run Chrome with the command
You can then just remove all the files you downloaded in ~/Desktop.

You can now also use flash with the development version of Chrome (as shown here), so it's all working pretty nicely now! [But, hey, Flash "...who uses that"!]