Environment:Getgauge Taiko Linux System Libraries
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Linux |
| Last Updated | 2026-02-12 03:00 GMT |
Overview
Ubuntu 22.04 system library dependencies required for running Chrome for Testing on Linux headless and headful environments.
Description
Chromium on Linux depends on a set of shared system libraries for rendering (GTK, Pango, Cairo), accessibility (ATK), security (NSS), audio (ALSA), and graphics (DRM, GBM). These are not bundled with the Chromium download and must be installed separately via the system package manager. The CI pipeline installs these on Ubuntu 22.04, and Docker images must include them as well.
Usage
Use this environment when running Taiko on Linux systems (Ubuntu, Debian, or derivatives). This includes CI/CD pipelines on GitHub Actions (ubuntu-22.04), Docker containers, and bare-metal Linux servers. Without these libraries, Chrome will fail to launch with shared library errors.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Ubuntu 22.04 LTS (or compatible) | Tested in CI on ubuntu-22.04 |
| Package Manager | apt-get | For Debian/Ubuntu-based systems |
| Headful Mode | Xvfb (X Virtual Framebuffer) | Required for headful tests on headless servers |
Dependencies
System Packages
- `libnss3` (Network Security Services for SSL/TLS)
- `libatk1.0-0` (Accessibility Toolkit core)
- `libatk-bridge2.0-0` (AT-SPI2 accessibility bridge)
- `libxcomposite1` (X11 Composite extension)
- `libcups2` (CUPS printing library)
- `libxrandr2` (X11 Resize and Rotate extension)
- `libpangocairo-1.0-0` (Pango/Cairo text rendering)
- `libgtk-3-0` (GTK+ 3 toolkit for UI)
- `libdrm-dev` (Direct Rendering Manager headers)
- `libgbm-dev` (Generic Buffer Management headers)
- `libasound-dev` (ALSA audio headers)
Headful Testing (Optional)
- `xvfb` (X Virtual Framebuffer for headful mode on headless servers)
Credentials
No credentials required for system library installation.
Quick Install
# Install all required Chromium dependencies
sudo apt-get update
sudo apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 \
libxcomposite1 libcups2 libxrandr2 libpangocairo-1.0-0 \
libgtk-3-0 libdrm-dev libgbm-dev libasound-dev
# For headful testing on headless servers
sudo apt-get install -y xvfb
xvfb-run npm test
Code Evidence
CI system library installation from `.github/workflows/taiko.yml:31-45`:
- name: install browser dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libxcomposite1 \
libcups2 \
libxrandr2 \
libpangocairo-1.0-0 \
libgtk-3-0 \
libdrm-dev \
libgbm-dev \
libasound-dev
Headful testing with Xvfb from `.github/workflows/taiko.yml:125-129`:
- name: headful-tests
run: xvfb-run npm run test-functional
env:
headless: false
TAIKO_HIGHLIGHT_ON_ACTION: false
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `error while loading shared libraries: libnss3.so` | libnss3 not installed | `sudo apt-get install -y libnss3` |
| `error while loading shared libraries: libatk-bridge-2.0.so.0` | libatk-bridge2.0-0 not installed | `sudo apt-get install -y libatk-bridge2.0-0` |
| `error while loading shared libraries: libgbm.so.1` | libgbm-dev not installed | `sudo apt-get install -y libgbm-dev` |
| `Failed to move to new namespace` | Sandbox permissions issue | Add `--no-sandbox` flag or enable user namespace cloning |
Compatibility Notes
- Ubuntu 22.04: The CI-validated reference platform. Package names may differ on other distributions.
- Alpine Linux: Not tested. Chromium on Alpine requires different packages (musl-based).
- CentOS/RHEL: Package names differ (e.g., `nss` instead of `libnss3`). Use `yum` or `dnf`.
- Docker: The official `getgauge/taiko` Docker image includes all required libraries. For custom images, install these packages in the Dockerfile.
- Headful mode: Requires either a display server (X11/Wayland) or Xvfb. CI uses `xvfb-run` wrapper.