Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 44235  / 1 Year ago, thu, may 18, 2023, 10:23:12

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.


More From » 13.04

 Answers
0

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.


[#28629] Friday, May 19, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
raacket

Total Points: 198
Total Questions: 114
Total Answers: 111

Location: Czech Republic
Member since Mon, May 15, 2023
1 Year ago
raacket questions
;