This page covers Linux-specific setup and configuration. The general checkout instructions cover installing depot tools and checking out the code via git.
Due its complexity, Chromium uses a set of custom tools to check out and build rather than configure/make like most projects. You must use gclient and ninja, and there is no “install” step provided.
Non-Ubuntu distributions are not officially supported for building and the instructions below might be outdated.
Once you have checked out the code, run build/install-build-deps.sh The script only supports current releases as listed on https://wiki.ubuntu.com/Releases. This script is used to set up the canonical builders, and as such is the most up to date reference for the required prerequisites.
Follow the Ubuntu instructions above. If you want to install the build-deps manually, note that the original packages are for Ubuntu. Here are the Debian equivalents:
Additionally, if you‘re building Chromium components for Android, you’ll need to install the package: lib32z1
For openSUSE 11.0 and later, see Linux openSUSE Build Instructions.
Recent systems:
su -c 'yum install subversion pkgconfig python perl gcc-c++ bison flex \ gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel atk-devel \ pango-devel cairo-devel fontconfig-devel GConf2-devel dbus-devel \ alsa-lib-devel libX11-devel expat-devel bzip2-devel dbus-glib-devel \ elfutils-libelf-devel libjpeg-devel mesa-libGLU-devel libXScrnSaver-devel \ libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel httpd \ mod_ssl php php-cli wdiff'
The msttcorefonts packages can be obtained by following the instructions present here. For the optional packages:
Most of these packages are probably already installed since they're often used, and the parameter --needed ensures that packages up to date are not reinstalled.
sudo pacman -S --needed python perl gcc gcc-libs bison flex gperf pkgconfig \ nss alsa-lib gconf glib2 gtk2 nspr ttf-ms-fonts freetype2 cairo dbus \ libgnome-keyring
For the optional packages on Arch Linux:
urpmi lib64fontconfig-devel lib64alsa2-devel lib64dbus-1-devel \ lib64GConf2-devel lib64freetype6-devel lib64atk1.0-devel lib64gtk+2.0_0-devel \ lib64pango1.0-devel lib64cairo-devel lib64nss-devel lib64nspr-devel g++ python \ perl bison flex subversion gperf
emerge www-client/chromium
If, during the final link stage:
LINK out/Debug/chrome
You get an error like:
collect2: ld terminated with signal 6 Aborted terminate called after throwing an instance of 'std::bad_alloc' collect2: ld terminated with signal 11 [Segmentation fault], core dumped
you are probably running out of memory when linking. You must use a 64-bit system to build. Try the following build settings (see GN build configuration for setting):
is_debug = false
symbol_level = 0
is_component_build = true
If you want to contribute to the effort toward a Chromium-based browser for Linux, please check out the Linux Development page for more information.