27

How can I install Chrome on Linux without needing to log in as root?

Note that I want to use Chrome, not Chromium.

If I go to the official download page, I get the choice between:

Please select your download package:
32 bit .deb (For Debian/Ubuntu)
64 bit .deb (For Debian/Ubuntu)
32 bit .rpm (For Fedora/openSUSE)
64 bit .rpm (For Fedora/openSUSE) 

Can I somehow extract and install Chrome from the .deb or the .rpm without needing to be root? Or is there another link that I missed?

SyntaxT3rr0r
  • 604
  • 2
  • 7
  • 9
  • 1
    This is about the only thing I love about Windows: I can install Google Chrome at school. –  Mar 09 '11 at 13:29
  • @Raked S: well on Windows using the *"portable xxx"* you can install basically any app without being admin... Here I could use Chromium but I don't get it: I'm pretty sure there were *.tar.gz* for previous versions of Chrome. – SyntaxT3rr0r Mar 09 '11 at 13:45

1 Answers1

26

I've successfully extracted the Fedora/OpenSUSE RPM into my home directory and ran chrome from there. You simply need to make sure that the symlinks for the libraries are all there. This assumes that the libraries area already installed, and $HOME/bin is in my $PATH.

I just ran:

mkdir ~/chrome; cd ~/chrome
rpm2cpio ~/Download/google-chrome-stable_current_x86_64.rpm | cpio -id
cd opt/google/chrome
ln -s /usr/lib64/libnss3.so libnss3.so.1d
ln -s /usr/lib64/libnssutil3.so libnssutil3.so.1d
ln -s /usr/lib64/libsmime3.so libsmime3.so.1d
ln -s /lib64/libplc4.so libplc4.so.0d
ln -s /lib64/libnspr4.so libnspr4.so.0d
ln -s /lib64/libbz2.so.1.0.6 libbz2.so.1.0
ln -s ~/chrome/opt/google/chrome/google-chrome ~/bin/google-chrome

Now, if you don't have all those libraries installed already, or there are other dependencies for the chrome binary that are unmet, you might need to build and install them in your homedir. Google Chrome helpfully adds ~/chrome/opt/google/chrome/lib to the $LD_LIBRARY_PATH, so you could install those additional dependencies there.

jsbillings
  • 24,006
  • 6
  • 56
  • 58
  • @jsbillings: just a question: you did it because you had no root access or just to help me? – SyntaxT3rr0r Mar 09 '11 at 14:20
  • 1
    @SyntaxT3rr0r: I've been trying to get Chrome to work on the RHEL5 systems in my office for a while, so I've gone through similar steps like this before. Sadly, RHEL5 has more problems than the above, since Chrome uses the API of newer versions of glib, gtk, pango, cairo, etc. Hopefully you're not stuck with such an ordeal. – jsbillings Mar 09 '11 at 14:24
  • 1
    @jsbillings: no actually it's to install on my own workstation, which I've got root access for. Simply I don't like to install "commercial" apps using the root account (I actually don't like the fact that you need to be root to install *.rpm* or *.deb*, my biggest gripe with Linux since 10+ years). Most of the apps here that do not come from official Debian repos I install them in the user account, without su'ing to root. – SyntaxT3rr0r Mar 09 '11 at 14:31
  • 1
    @SyntaxT3rr0r: I agree. The google chrome RPM is even more insidious, creating a cron job that perpetually installs a yum repository for google chrome, which could conceivably be used to track users and potentially release other unwanted software on a system if you're not paying close attention to where updates come from. – jsbillings Mar 09 '11 at 14:52
  • @jsbillings: darn... That Google Chrome RPM is worrysome too :( It's really sad we can't just easily get a good old *.tar.gz* :) – SyntaxT3rr0r Mar 16 '11 at 15:49
  • About the extra repository - the download page now mentions that you can stop this being added by doing "sudo touch /etc/default/google-chrome" before installing the package. – Andy Lynch Sep 05 '11 at 08:22
  • Actually, recent versions of chrome have hardcoded the /opt location: [3725:3725:2095197224256:FATAL:zygote_host_linux.cc(129)] The SUID sandbox helper binary is missing: /opt/google/chrome/chrome-sandbox Aborting now. –  Sep 05 '11 at 18:51
  • 1
    @user10508: You can override the path in your environment via `export CHROME_DEVEL_SANDBOX=/path/to/chrome-sandbox`. I found I had to run chrome with the `--no-sandbox` option in order to function without a setuid root chrome-sandbox binary. – loopforever May 25 '12 at 20:40
  • +1 for the `--no-sandbox` command line option, as the sandbox will need 4755 and must be owned by root. – math Apr 16 '13 at 07:43
  • On RHEL 6.4 I get the following: `./google-chrome: ~/apps/chrome/opt/google/chrome/libstdc++.so.6: version ``GLIBCXX_3.4.15' not found (required by ./google-chrome) ./google-chrome: /usr/lib64/libnss3.so: version ``NSS_3.14.3' not found (required by ./google-chrome)` – AsGoodAsItGets Mar 03 '14 at 09:49
  • I realize this is not about RHEL, but any ideas how I can make it work? Thanks in advance :) – AsGoodAsItGets Mar 03 '14 at 09:52
  • This isn't going to work anymore on RHEL6. The stable versions of Google Chrome includes libraries that require a newer version of libc (and many other libraries) that aren't provided by RHEL6. The Google Chrome package works fine in RHEL7 though. – jsbillings Jul 23 '14 at 23:05
  • I tried installing chrome using above steps but when i try to run it it give me this error: ./google-chrome: symbol lookup error: ./google-chrome: undefined symbol: gdk_x11_window_lookup_for_display' Any workarounds? – G Gill Oct 06 '14 at 21:25
  • @AsGoodAsItGets You need to relink everything and resolve all dependencies manually (hours of work for me). A nice utility, PatchELF can reset the links of the ./chrome executable to whatever you want. See https://stackoverflow.com/a/44710599/9900563. However, after all that work, I only managed to get a seg fault, but I am fairly sure it's doable this way. – G. Bergeron Jun 06 '18 at 01:13