10

I am trying to install google-chrome-stable on a fresh ubuntu 12.04 installation. I run the following commands

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb

I get the following errors

dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on libstdc++6 (>= 4.8.0); however:
Version of libstdc++6 on system is 4.6.3-1ubuntu5.
 google-chrome-stable depends on lsb-base (>= 4.1); however:
Version of lsb-base on system is 4.0-0ubuntu20.3.
dpkg: error processing google-chrome-stable (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Errors were encountered while processing:
 google-chrome-stable

When I run sudo apt-get install -f I just have google-chrome-stable removed:

The following packages will be REMOVED
  google-chrome-stable

If I look for the required versions, e.g. I try sudo apt-get install libstdc++6=4.8.0 I cannot find the version:

E: Version ‘4.8.0’ for ‘libstdc++6’ was not found

How do I fix that?

I know there is no longer support for 32bit version of Ubuntu 12.04. I am running 64bit Ubuntu version.

  • @glut the actual title is accurate. It says the exact error message. – Braiam Jun 28 '16 at 19:24
  • @Braiam I would argue it's only partly accurate because it doesn't include the lsb_base error – Glutanimate Jun 28 '16 at 19:25
  • @Glutanimate but lsb-base has no library/binary that Chrome uses. – Braiam Jun 28 '16 at 19:27
  • @Braiam Ok, true. Now that I think of it, most users will search for the first part of error message anyway, so let's stay with that. – Glutanimate Jun 28 '16 at 19:31
14

You are receiving these errors because Google has ended the support for Ubuntu 12.04.

Google: We will end support for Google Chrome on 32-bit Linux, Ubuntu Precise (12.04).

You alternatively can install the chromium-browser on which Google Chrome is built on.

You also can install Ubuntu 14.04 LTS or Ubuntu 15.10 - both are supported - to use Chrome.

But I suggest that you wait until April, 21st when the new Ubuntu 16.04 LTS will be released.

You should consider that Ubuntu 12.04 LTS has only one year of official security support left.

| improve this answer | |
  • I have 64bit Ubuntu version. I just reinstalled the operative system, I had chrome working on the same exact configuration until one week ago. My bad I did not say that, sorry – fmonegaglia Apr 18 '16 at 9:17
  • 5
    @fmonegaglia : The most important thing here is that Ubuntu 12.04 is generally not supported anymore, independent from whether the 32 bit or the 64 bit Ubuntu edition is in use. Google Chrome can only be installed on 64 bit Ubuntu editions that are supported, starting from Ubuntu 14.04 ... :) – cl-netbox Apr 18 '16 at 9:24
  • This is definitely the correct answer. Unfortunately some of us are stuck with 12.04 for whatever reason. Effort should be spent getting off 12.04 rather than temporary solutions like downgrading (below). However sometimes you do just need to get stuff working. – lathonez Apr 19 '16 at 22:49
6

Last Edit (2017-09-13):

This solution no longer works for Chrome releases 60 and up. The latest packages depend on libc6 ≥ 2.17 which can't be installed on Ubuntu 12.04. If you are still using Precise you should either consider upgrading (like I did), or if you can't do that still, switch to another browser (although at this point you are unlikely to find any that are still being maintained).


Edit (2016-12-06): Looks like Chrome also depends on an updated version of libfontconfig1 now (≥ 2.9.0). I've updated the script accordingly. The new version seems to be working fine so far, but please note that with each feigned dependency you can expect the app to become less stable.

Edit (2017-06-10): Chrome 59 comes with new dependencies (libfontconfig1 ≥ 2.11, libpango, and libpangocairo). I've updated the script to remove these. The same caveat as to Chrome's stability applies again.


Workaround for dependency issues on Ubuntu 12.04 64bit

Official Chrome support for Ubuntu version 12.04 has ended, but this doesn't mean that you have to abandon Chrome just yet. What follows is a quick tutorial on how to install the latest Chrome release (as of 2016-06-28) on Ubuntu 12.04 64-bit.

Warning: This is a very hackish solution that might stop working at any point in time. Please make sure you know what you're doing before proceeding.

Pre-requisites

Updated kernel

Important: Please note that updating your kernel might come with its own set of troubles and hardware compatibility issues. Make sure you know how to switch to an earlier kernel before proceeding with this step.

Recent Chrome releases depend on a number of kernel features related to sandboxing that aren't available in Ubuntu 12.04's default kernel (3.2.0). If you've installed Ubuntu 12.04 using a more recent image (point release 12.04.2 and up), chances are that you're already sporting an updated kernel; but if you're still on the original kernel release you can update to Ubuntu 14.04's kernel stack via the LTS hardware enablement stack package:

sudo apt-get install --install-recommends linux-generic-lts-trusty

Make sure to reboot your system after performing the kernel upgrade. If everything went well your system should now be using Linux kernel 3.13.X.

Dependency issues

If you look at the error message you receive when trying to install a recent Chrome build you will see two distinct dependency issues:

  1. libstdc++6 (>= 4.8.0): This is the GNU standard C++ library. Chrome releases 50.X and up depend on version 4.8.0 of this library, but Ubuntu 12.04 only comes with 4.6.3 by default.
  2. lsb-base (>= 4.1): This is the Linux Standard Base package. It indicates the distribution's compliance with a set of standards set by the Linux Foundation. Chrome releases 50.X+ require compliance with the standards defined in LSB base 4.1, but Ubuntu 12.04 is only compliant with 4.0.

As it turns out both of these issues can be fixed rather easily:

libstdc++6 (>= 4.8.0)

Important: libstdc++6 is an important system library that many different packages depend on. Upgrading this package to a newer release might be dangerous and might lead to system stability issues. I haven't experienced any issues myself on the two systems I've performed this upgrade on, but - as always - your mileage might vary.

Fortunately for us, libstdc++6 4.8.X is available in the official Ubuntu toolchain test builds PPA. As a first step we'll add this PPA to our software sources:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

Installing Google Chrome from this point on will pull the libstdc++6 dependency from the PPA, eliminating the first dependency issue. With this solved, let's proceed to the second issue.

lsb-base (>= 4.1)

It turns out that we don't actually need to install an updated version of this package to get recent versions of Chrome running. For now Chrome doesn't seem to actually depend on any of the modified standards in LSB base 4.1, so the dependency on lsb-base (>= 4.1) seems to be a soft dependency which we can simply remove.

You could do this manually, of course, but I've written a script that takes care of most of the following steps for you.

Installation script

#!/bin/bash

# Name:         Chrome installer for Ubuntu 12.04 LTS 64-bit
# Author:       (c) 2016-2017 Glutanimate
# License:      GNU GPLv3
# Manual:       http://askubuntu.com/a/792442/

# Description:
#
# Downloads latest chrome release and makes it compatible with 12.04.
#
# This is a hack that will likely stop working at some point,
# but for those of us who can't upgrade Ubuntu just yet
# it's better than running a completely obsolete Chrome release.

set -e

tmpDir=$(mktemp -d /tmp/deb.XXXXXXXXXX)
debUrl="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
debFile="$tmpDir/chrome.deb"

cleanup () {
  [[ -n "$tmpDir" ]] && [[ -d "$tmpDir" ]] && rm -r "$tmpDir"
}

trap "cleanup" EXIT

echo "Downloading latest Chrome release..."
mkdir -p "$tmpDir/build"
buildDir="$tmpDir/build"
wget "$debUrl" -O "$tmpDir/chrome.deb" || exit 1
echo "Extracting original deb file..."
dpkg-deb -x "$debFile" "$buildDir"
dpkg-deb --control "$debFile"  "$buildDir/DEBIAN"
echo "Updating dependencies..."
perl -pe  's|lsb-base \(\>\= 4\.1\)|lsb-base \(\>\= 4\.0\)|g' "$buildDir/DEBIAN/control" > "$buildDir/DEBIAN/control.1"
perl -pe  's|libfontconfig1 \(\>\= 2\.11\)|libfontconfig1 \(\>\= 2\.8\.0\)|g' "$buildDir/DEBIAN/control.1" > "$buildDir/DEBIAN/control"
perl -pe  's|libpango-1\.0-0 \(\>\= 1\.14\.0\), libpangocairo-1\.0-0 \(\>\= 1\.14\.0\), ||g' "$buildDir/DEBIAN/control" > "$buildDir/DEBIAN/control.1"
mv "$buildDir/DEBIAN/control.1" "$buildDir/DEBIAN/control"
echo "Building new deb file..."
dpkg -b "$buildDir" "$tmpDir/chrome_modified.deb"
echo "Installing new Chrome version. Please enter your password:"
sudo dpkg -i "$tmpDir/chrome_modified.deb"

Copy the script above, save it as install_chrome.sh and mark it as executable (either via chmod +x install_chrome.sh or your file manager's properties dialog).

Having done that you can execute the script using:

./install_chrome.sh

The script will proceed to download the latest stable Chrome release, modify it to remove the dependency on lsb-base 4.1 and prompt you to install the updated .deb file via dpkg.

Congratulations, you're now using an updated release of Google Chrome on Ubuntu 12.04!

Updates

To update Chrome simply run the script again.

Future compatibility

Important: Because this solution might stop working at any time, I'd advise you to always save the latest working modified .deb file as a backup in case Chrome suddenly refuses to start due to an update.

To save the latest modified installer simply head to the script's temporary directory right after getting the sudo password prompt when running the script (i.e. right before installing the modified .deb file). The temporary directory should be located somewhere under /tmp/deb.XXXXXXXXX (where XXXXXXXXX is a random string).

| improve this answer | |
  • 1
    Due to policies enforced by my company, I am stuck with Ubuntu 12.04. I was able to install chrome anyway using your script. Thanks a lot! – Eugeniu Rosca Aug 19 '16 at 16:46
4

I don't think you can. They've just upgraded and the dependencies cannot be met in 12.04.

I've had the same problem on a travis build and have downgraded. Loads of old versions here.

Obviously not a great answer, I looked for a good while and couldn't find a way without downgrading.

| improve this answer | |
  • 1
    Im going with this one. It is of course not the best way to go, but it works for me as a temporary solution, since I cannot upgrade to later Ubuntu versions by now. – fmonegaglia Apr 18 '16 at 9:27
  • The link to mirror.pcbeta.com gone 404. – AlexD Apr 25 '16 at 7:47
2

As Google have stopped support for Chrome and 12.04, your best solution is to install Chromium instead:

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-get update
sudo apt-get install chromium-browser
| improve this answer | |
1
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on libstdc++6 (>= 4.8.0); however:
Version of libstdc++6 on system is 4.6.3-1ubuntu5.
 google-chrome-stable depends on lsb-base (>= 4.1); however:
Version of lsb-base on system is 4.0-0ubuntu20.3.

Basically, Google Chrome is asking for lsb-base and libstdc++6 which are not available in Precise:

>lsb-base   | 4.0-0ubuntu20          | precise         | all
>lsb-base   | 4.0-0ubuntu20.3        | precise-updates | all
 lsb-base   | 4.1+Debian11ubuntu6    | trusty          | all
 lsb-base   | 4.1+Debian11ubuntu6.1  | trusty-proposed | all
 lsb-base   | 4.1+Debian11ubuntu8    | vivid           | all
 lsb-base   | 4.1+Debian11ubuntu8    | wily            | all
 lsb-base   | 9.20160110             | xenial          | all
>libstdc++6 | 4.6.3-1ubuntu5         | precise         | amd64, armel, armhf, i386, powerpc
 libstdc++6 | 4.8.2-19ubuntu1        | trusty          | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 4.8.4-2ubuntu1~14.04.1 | trusty-updates  | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 4.9.2-10ubuntu13       | vivid           | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 5.2.1-22ubuntu2        | wily            | amd64, arm64, armhf, i386, powerpc, ppc64el
 libstdc++6 | 5.3.1-14ubuntu2        | xenial          | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x

You would need Trusty (which is also LTS) or later to install google-chrome from Google, or just install the one provided by the Ubuntu repositories chromium-browser.

| improve this answer | |
1

I cannot comment directly on Glutanimate answer, but I would like to share it anyways. I needed to add an additional line to the installscript:

perl -pe  's|libnspr4 \(\>\= 2\:4\.9\-2\~\)|libnspr4 \(\>\= 4\.12\)|g' "$buildDir/DEBIAN/control.1" > "$buildDir/DEBIAN/control"

Chrome seems to run fine with this, but it would not allow me to install it otherwise.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.