Skip to content

pa11y installation dependencies on Linux distros #616

Description

@AshleyCliff

Trying to run make pa11y in a 'clean' Ubuntu environment (i.e. Multipass) leads to the following error:

Error: Failed to launch the browser process:  Code: 127 stderr: /home/ubuntu/.cache/puppeteer/chrome/linux-148.0.7778.97/chrome-linux64/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory 
TROUBLESHOOTING: https://pptr.dev/troubleshooting
 at ChildProcess.onClose (/home/ubuntu/docs/_dev/node_modules/@puppeteer/browsers/lib/cjs/launch.js:350:24)
at ChildProcess.emit (node:events:521:24)
at ChildProcess._handle.onexit (node:internal/child_process:295:12)

Puppeteer's troubleshooting page suggests running:
ldd /home/ubuntu/.cache/puppeteer/chrome/linux-148.0.7778.97/chrome-linux64/chrome | grep "not found" and installing those missing. This leads to a decent number (~11) manual installations.

The list that worked for me:

  • libasound2t64
  • libcairo2
  • libcups2t64
  • libgbm1
  • libxcomposite1
  • libxdamage1
  • libxfixes3
  • libxrandr2
  • libatk1.0-0
  • libatk-bridge2.0-0
  • libpango-1.0-0

While these don't have to be part of the make pa11y-install process, it would make life easier if it was included in a manner similar to pdf-prep-force. (It would be great to have the npm install handled as well if possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions