(Created on )

Puppeteer: Failed to install system dependencies: apt-get does not seem to be available

Automatic Linux system-dependency installation cannot find apt-get.


Automatic Linux system-dependency installation cannot find apt-get.

Error message

Failed to install system dependencies: apt-get does not seem to be available

How this error happens

Automatic system-dependency installation uses apt-get. A distribution such as Alpine does not provide that package manager.

The failing command assumes a root build environment whose distribution has no apt-get.

npx puppeteer browsers install chrome \
    --install-deps

How to fix

Use this automatic dependency installer on a Debian/Ubuntu-based environment with apt-get, or provision an appropriate compatible browser and libraries using your distribution’s own tooling.

FROM node:bookworm-slim

WORKDIR /app

COPY package*.json ./

RUN npm install

RUN npx puppeteer browsers install chrome --install-deps

Things to keep in mind

This is a build-stage example, not a complete deployment image. Install OS packages while privileged, then use an unprivileged runtime user and preserve sandboxing. Do not add apt-get to an unrelated distribution and assume that Chrome becomes compatible.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →