26. February 2013 · 1 comment · Categories: Uncategorized · Tags: ,

I had a problem – I had Chromium 21 installed on a PLD Linux system I was using. It was pretty unstable and crashed often, especially when using Pig Toolbox plugin with it. I decided to get my own version directly from Google, but there was a problem: I didn’t have root rights to install it. I will describe how I resolved this problem.

First, I downloaded a .deb x64 package from Google Chrome download site and extracted it with command:

dpkg -x google-chrome-stable_current_amd64.deb chrome

Extracted folder “chrome” had 3 folders: etc, opt and usr. Interesting stuff – binary files – are in opt/google/chrome. In a perfect world, we could just move opt/google/chrome anywhere and run Chrome with ./chrome command inside that directory. But, I got following error:

./chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory

I used pretty dirty way to resolve that problem. I just made a symlink libudev.so.0 in chrome’s directory pointing at libudev library that was already installed in the system:

ln -s /usr/lib64/libudev.so libudev.so.0

In your case, you’ll probably want to do a similar thing for any libraries chrome can’t find, but you have them installed in your system (of course everything might crash if library version isn’t supported by Chrome). You might have to download some missing libraries too and put a symlink to them in Chrome’s folder. After getting rid of library problems, I got following error:

[3880:3880:0226/160426:FATAL:zygote_host_impl_linux.cc(125)] The SUID sandbox helper binary is missing: /opt/google/chrome/chrome-sandbox Aborting now.

As I read on forums later, It turns out that Google Chrome’s sandbox is implemented in a pretty bad way – it even has hardcoded paths in it. Essentially, that means that standalone Chrome won’t  run with sandbox. Fortunately, one can resolve this by using –no-sandbox option:

./chrome --no-sandbox

Now it runs perfectly. To complete everything, I made a script for myself (below) to run Chrome and binded a key for it. I moved my Chrome to ~/bin/chrome, so modify the path as you wish. I recommend putting absolute path here, so that the script will run from anywhere.

#!/bin/bash
cd ~/bin/chrome
./chrome --no-sandbox --disk-cache-size=50000000 --allow-outdated-plugins

–disk-cache-size is an options that limits cache size in bytes (50MB above). Chrome can use quite a bit of cache – in my case over 0.5GB. I used –allow-outdated-plugins for old flash/java plugins installed on my system to work.

Warning: not using a sandbox is a security vunerability. Don’t use it if security is important in your environment.