27

Trying to start chrome yields in following error on the command line:

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

The error first appeared in Ubuntu 13.04, I tried purging and reinstalling Chrome. It persisted after upgrading to Ubuntu 13.10.

0

2 Answers 2

36

As Gilles pointed out, this approach can lead to unwanted behaviour. Please try his solution first. If it doesn't work for you and you understand the implication that this may lead to silent data corruption, you may do the following:

Assuming a 64-bit system, the missing symlink can be created via:

sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1.3.5 /usr/lib/libudev.so.0

For Ubuntu 18:

sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1.6.9 /usr/lib/libudev.so.0

For a 32-bit system:

sudo ln -s /lib/i386-linux-gnu/libudev.so.1.3.5  /usr/lib/libudev.so.0

You may have to check your local version of libudev.

4
  • 1
    This answer also applies to issue like "Google Chrome does not start after upgrade to 13.10."
    – Sri
    Feb 17, 2014 at 4:11
  • This also works for Dartium (the development version of Chromium with Dart VM embedded). Although I created the link against the link libudev.so.1 instead in the hope that if the version changes the link still wroks, but I'm not sure about that. The only thing I can said is that it worked for me. Kubuntu 14.10.
    – user69112
    Jun 3, 2014 at 18:22
  • 2
    This is a bad idea: it works for Chrome, but it could break other programs that don't come from Ubuntu — instead of getting an error message, you could get silent data corruption. Oct 1, 2014 at 16:35
  • This works for me Apr 6, 2015 at 2:12
17

If Chrome doesn't start after an Ubuntu upgrade from ≤12.10 to ≥13.04, open a terminal and run the following command:

sudo dpkg-reconfigure google-chrome-stable

Explanations follow.


At least for Chrome versions form 28 to 37, the Chrome binary can use whichever of libudev.so.0 or libudev.so.1 is present on the system. With the fix to Chromium/Chrome Issue 226002 (which went into the unstable channel in April 2013), the installer determines which one to use. The binary references libudev.so.0; the installer creates a symbolic link from /opt/google/chrome/libudev.so.0 to the libudev.so.1 on the system if libudev.so.0 is not found.

Note that it would be a bad idea to create one in /usr/lib. Major version numbers in libraries change when the newer version is incompatible. Creating this symbolic link works well for Chrome because it only uses features that are compatible between version 0 and version 1. Other applications might crash or produce corrupt data if you force them to run with the wrong version.

The method used by the Chrome package works well under most circumstances, but it's still a dirty hack, and it has a limitation. If the libudev0 package is uninstalled after Chrome is installed, which is likely to happen when you upgrade Ubuntu, then Chrome will still be set up to use libudev.so.0 but the file won't be available anymore. To fix this, cause the installation script to run again, and this time detect that libudev.so.0 is not available so it should create the symbolic link to use libudev.so.1 instead. You can re-run the installation script by running dpkg-reconfigure google-chrome-stable as root.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .