"google-chrome-stable depends on libstdc++6 (>= 4.8.0); however: Version of libstdc++6 on system is 4.6.3-1ubuntu5."

Solution 1:

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.

Solution 2:

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).

Solution 3:

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.

Solution 4:

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