Chromium is not working in Ubuntu 12.04
This is the error I get at command line:
/usr/lib/chromium-browser/chromium-browser: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
But when clicking on the chromium icon at the left menu it is exiting automatically rather opening it.
53 Answers
There are several steps to get the very latest chromium-browser package running on Precise Pangolin, but I have succeeded and so should you!
1. Install from PPA:
This PPA is not recommended for general use but worked well on my Precise Pangolin system:
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browserchromium-browser will not work out of the box as you have experienced until a few other issues are attended to...
2. Missing libatomic:
You will see an error when loading chromium-browser from the command line: a missing library libatomic.so.1. You can search for this missing file by using the great utility apt-file:
sudo apt-get install apt-file
apt-file update(This creates a local index rather than a system one, use sudo apt-file update if you want a system index.)
You will be prompted to download file indices and you should accept this prompt and allow the download. Then search for the missing file:
andrew@ithaca:~$ apt-file search libatomic.so.1
gcc-mozilla: /usr/lib/gcc-mozilla/lib/libatomic.so.1
gcc-mozilla: /usr/lib/gcc-mozilla/lib/libatomic.so.1.0.0
gcc-mozilla: /usr/lib/gcc-mozilla/lib32/libatomic.so.1
gcc-mozilla: /usr/lib/gcc-mozilla/lib32/libatomic.so.1.0.0
andrew@ithaca:~$ You can see that it is part of the gcc-mozilla package which you can install as follows:
sudo apt-get install gcc-mozillaNote that shared libraries are not sourced from the gcc-mozilla installation location as demonstrated here:
andrew@ithaca:~$ ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/local/lib:
/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu/mesa-egl:
/usr/lib/x86_64-linux-gnu/mesa:
/lib32:
/usr/lib32:
/lib:
/usr/lib:
andrew@ithaca:~$So we add an extra path for chromium-browser with a slight variation of the technique demonstrated by @Renaud:
sudo touch /etc/ld.so.conf.d/chromium-browser.conf
echo "/usr/lib/gcc-mozilla/lib" | sudo tee -a /etc/ld.so.conf.d/chromium-browser.conf
sudo ldconfigAnd you will now see the added search path:
andrew@ithaca:~$ ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/lib/gcc-mozilla/lib: <------------- Here!
/usr/local/lib:
/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu/mesa-egl:
/usr/lib/x86_64-linux-gnu/mesa:
/lib32:
/usr/lib32:
/lib:
/usr/lib:
andrew@ithaca:~$ Note: If you try the aptitude build-dep chromium-browser method this step (adding the LD path) will still need to be followed...
But still more errors:
3. Missing libXss.so.1:
You will then get an error message:
error while loading shared libraries: libXss.so.1:
cannot open shared object file: No such file or directory Once again apt-file will locate the appropriate package:
andrew@ithaca:~$ apt-file search libXss.so.1
libxss1: /usr/lib/x86_64-linux-gnu/libXss.so.1
libxss1: /usr/lib/x86_64-linux-gnu/libXss.so.1.0.0
libxss1-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/libXss.so.1.0.0
andrew@ithaca:~$And then install this library as follows:
sudo apt-get install libxss1And that should do it as chromium-browser has no problem finding the library once installed!
4. Running the browser:
Running nicely here:
andrew@ithaca:~$ chromium-browser --version
Chromium 52.0.2743.116 Built on Ubuntu , running on Ubuntu 12.04
andrew@ithaca:~$ And the obligatory screenshot:
Click for full sized image....
And have fun :)
References:
9I had the same issue after upgrading. I installed the "gcc-mozilla" package, then updated LD so that it loads the library, as described below:
$ sudo -i
# apt-get install gcc-mozilla
# echo "/usr/lib/gcc-mozilla/lib" > /etc/ld.so.conf.d/chromium-browser.conf
# ldconfig
# exitChromium should now load gracefully.
3Use aptitude build-dep to install dependencies before installing chromium-browser
$ aptitude -v -V build-dep chromium-browser
..
The following actions will resolve these dependencies: Upgrade the following packages:
1) gtk2-engines-pixbuf [2.24.10-0ubuntu6 (now, precise) -> 2.24.10-0ubunt
2) libgail-common [2.24.10-0ubuntu6 (now, precise) -> 2.24.10-0ubuntu6.3
3) libgail18 [2.24.10-0ubuntu6 (now, precise) -> 2.24.10-0ubuntu6.3 (prec
4) pciutils [1:3.1.8-2ubuntu5 (now, precise) -> 1:3.1.8-2ubuntu6 (precise
Accept this solution? [Y/n/q/?] ySee this Answer at How to install latest package version of a ppa?
2